//http://tb1.bdstatic.com/??/tb/_/poster/rich_poster_af27300.js,/tb/_/placeholder_fd56d8e.js,/tb/_/login_dialog_21db6a0.js,/tb/_/show_dialog_d46d0a5.js,/tb/_/sms_verify_dialog_cb7b503.js,/tb/_/forbidden_ea6d3fd.js,/tb/_/poster/poster_context_af70d7c.js,/tb/_/snowflow_6f0903a.js,/tb/_/tdou_open_type_a72e1ed.js,/tb/_/user_api_10e048c.js,/tb/_/icons_da74e35.js,/tb/_/base_user_data_7bf9fa5.js,/tb/_/base_dialog_user_bar_2f6ce60.js,/tb/_/qianbao_cashier_dialog_5247354.js,/tb/_/qianbao_purchase_member_7bae6a4.js,/tb/_/messenger_c93e9bb.js,/tb/_/cashier_dialog_d52cf7c.js,/tb/_/pay_member_c57f92d.js,/tb/_/poster/post_signature_29deca7.js,/tb/_/poster/mouse_pwd_b9b45b5.js,/tb/_/tbcopy_0deb361.js,/tb/_/tbshare_share_f216378.js,/tb/_/poster/share_thread_c8aa28c.js,/tb/_/poster/bsk_service_c6680a4.js,/tb/_/poster/params_xss_handler_2083372.js

_.Module.define({
	path: "poster/pagelet/rich_poster",
	sub: {
		initial: function() {}
	}
});
_.Module.define({
	path: "tbui/widget/placeholder",
	sub: {
		initial: function(i, t, e) {
			var h = this;
			this.$input = $(i), this.$placeholder = $("<div class='tbui_placeholder'></div>").text(t), this.$placeholder.click(function() {
				h.$input.click(), h.$placeholder.hide(), h.$input.focus()
			}), this.$input.focus(function() {
				h.$placeholder.hide()
			}).blur(function() {
				0 == this.value.length && h.$placeholder.show()
			}).change(function() {
				0 === this.value.length ? h.$placeholder.show() : h.$placeholder.hide()
			}), this.$input.offsetParent();
			var l = this.$input.position();
			l.height = this.$input.height(), l.top += (this.$input.outerHeight() - l.height) / 2, l.left += (this.$input.outerWidth() - this.$input.width()) / 2, l.lineHeight = this.$input.is("textarea") ? this.$input.css("line-height") : l.height + "px", this.$placeholder.css(l), e && this.$placeholder.css(e), this.$placeholder.insertAfter(this.$input), this.$input.val().length > 0 && this.$placeholder.hide()
		}
	}
});
_.Module.define({
	path: "tbui/widget/LoginDialog",
	sub: {
		_config: {
			apiOpt: {
				staticPage: $.tb.location.getProtocol() + "//" + $.tb.location.getHost() + "/tb/static-common/html/pass/v3Jump.html",
				product: "tb",
				charset: PageData.charset ? PageData.charset : "UTF-8",
				u: $.tb.location.getHref(),
				memberPass: !0,
				safeFlag: 0,
				qrcodeCfg: {
					appName: "\u624b\u673a\u8d34\u5427 - \u6211\u7684",
					appHref: "http://tieba.baidu.com/c/s/download/pc"
				}
			},
			cache: !0,
			onLoginSuccess: function(t) {
				t.returnValue = !1, $.tb.location.reload(), $.stats.track("\u8d34\u5427\u767b\u5f55\u7edf\u8ba1", "\u767b\u5f55\u6210\u529f", "", "click")
			},
			onShow: function() {
				$.stats.track("\u8d34\u5427\u767b\u5f55\u7edf\u8ba1", "\u767b\u5f55\u6846\u6253\u5f00", "", "view")
			},
			onHide: function() {
				$.stats.track("\u8d34\u5427\u767b\u5f55\u7edf\u8ba1", "\u767b\u5f55\u6846\u5173\u95ed", "", "view")
			},

		},
		initial: function() {
			var t = this;
			! function(a) {
				var e = "undefined" != typeof Env && Env.server_time ? Env.server_time : (new Date).getTime(),
					o = "https://passport";
				a.JsLoadManager.use([o + ".baidu.com/passApi/js/uni_login_wrapper.js?cdnversion=" + Math.floor(e / 6e4)], function() {
					a.passPopInstance || (a.passPopInstance = passport.pop.init(t._config)), a.passPopInstance.show()
				}, !0, "utf-8")
			}(window.jQuery)
		}
	}
});
_.Module.define({
	path: "encourage-payment/widget/show_dialog",
	sub: {
		initial: function(t) {
			var e = this;
			e.container = t.container, e.$container = e.container.element, e.type = t.type, e.top = parseInt(e.$container.css("top"), 10), e.height = e.$container.outerHeight()
		},
		show: function() {
			var t = this,
				e = "show";
			switch(t.type) {
				case "top-pop":
					t.topPop(e);
					break;
				case "bigger":
					t.biggerShow(e);
					break;
				default:
					t.showDefault(e)
			}
		},
		close: function() {
			var t = this,
				e = "close";
			switch(t.type) {
				case "top-pop":
					t.topPop(e);
					break;
				case "bigger":
					t.biggerShow(e);
					break;
				default:
					t.showDefault(e)
			}
		},
		getOriginSize: function() {
			var t = $(".dialogJ");
			if($.isEmptyObject(t)) return {
				width: 0,
				height: 0
			};
			var e = t.eq(t.length - 2);
			return {
				width: e.outerWidth(),
				height: e.outerHeight(),
				top: e.css("top"),
				left: e.css("left")
			}
		},
		getEndSize: function() {
			return {
				width: this.$container.outerWidth(),
				height: this.$container.outerHeight(),
				top: this.$container.css("top"),
				left: this.$container.css("left")
			}
		},
		biggerShow: function(t) {
			var e = this,
				i = e.getOriginSize(),
				o = e.getEndSize();
			"show" === t ? (e.$container.css({
				width: i.width,
				height: i.height,
				top: i.top,
				left: i.left
			}), e.container.show(), e.$container.animate({
				width: o.width,
				height: o.height,
				top: o.top,
				left: o.left
			})) : e.$container.animate({
				width: i.width,
				height: i.height,
				top: i.top,
				left: i.left
			}, function() {
				e.container.close()
			})
		},
		topPop: function(t) {
			var e = this;
			"show" === t ? (e.$container.css({
				top: -(e.top + e.height)
			}), e.container.show(), e.$container.animate({
				top: e.top
			})) : e.$container.animate({
				top: -(e.top + e.height)
			}, function() {
				e.container.close()
			})
		},
		showDefault: function(t) {
			var e = this;
			"show" === t ? e.container.show() : e.container.close()
		}
	}
});
_.Module.define({
	path: "ueglib/widget/sms_verify_dialog",
	requires: ["encourage-payment/widget/show_dialog", "tbui/widget/LoginDialog", "tbui/widget/placeholder"],
	sub: {
		initial: function(i) {
			this.isLoading = !1, this.verifyResult = !1, this.oldValue = "", this.opts = i || {}
		},
		initDialog: function() {
			var i = this;
			i.dialog = new $.dialog({
				html: _.template('<div class="sms-dialog-wrap">     <div class="sms-dialog-header">         <span class="dialog-title">\u77ed\u4fe1\u9a8c\u8bc1</span>         <a class="dialog-close-btn"></a>     </div>     <div class="sms-dialog-content">         <div class="section sms-verify-wrap">             <div class="sms-subject">                 \u4eb2\u7231\u7684\u7528\u6237\uff0c\u60a8\u7684\u5e10\u53f7\u5b58\u5728\u88ab\u76d7\u98ce\u9669\u9700\u8981\u8fdb\u884c\u9a8c\u8bc1\u54e6~             </div>             <div class="step-wrap">                 <div class="step-num">\u7b2c1\u6b65</div>                 <div class="step-content">                     <span>\u8bf7\u7f16\u8f91\u77ed\u4fe1</span>                     <span class="verify-code"></span>                     <span>\u53d1\u9001\u81f3</span>                     <span class="receiver">1069 0691 0365 788</span>                     <span>\u8fdb\u884c\u9a8c\u8bc1</span>                 </div>             </div>             <div class="step-wrap">                 <div class="step-num">\u7b2c2\u6b65</div>                 <div class="step-content">                     <div class="clearfix">                         <span class="phone-label">\u8f93\u5165\u624b\u673a\u53f7\u5e76\u70b9\u51fb\u201c\u5df2\u53d1\u9001\u9a8c\u8bc1\u77ed\u4fe1\u201d</span>                         <span class="count-down">                             <span>\u7b49\u5f85\u9a8c\u8bc1\uff0c\u5269\u4f59</span>                             <span class="count-down-time"></span>                         </span>                         <span class="over-time">                             <span>\u5df2\u8d85\u65f6</span>                             <a class="reverify-btn">\u91cd\u65b0\u9a8c\u8bc1</a>                         </span>                     </div>                     <input                         class="sms-verify-phone"                         type="text"                         placeholder="\u8f93\u5165\u53d1\u9001\u77ed\u4fe1\u7684\u624b\u673a\u53f7"                         maxlength="13"                         autocomplete="off"                     >                     <div class="error-tip"></div>                     <div class="btn-wrap">                         <a class="big-btn verify-btn btn-disabled">                             \u5df2\u53d1\u9001\u9a8c\u8bc1\u77ed\u4fe1                         </a>                         <span class="btn-loading"></span>                     </div>                 </div>             </div>             <div class="footer-tip">                 <p>\u6e29\u99a8\u63d0\u793a\uff1a</p>                 <p>\u6bcf\u4e2a\u624b\u673a\u53f7\u7801\u53ea\u80fd\u9a8c\u8bc1\u4e00\u4e2a\u5e10\u53f7</p>                 <p>\u53d1\u9001\u77ed\u4fe1\u540e\u8fd0\u8425\u5546\u4f1a\u6839\u636e\u60a8\u624b\u673a\u8d44\u8d39\u60c5\u51b5\u6536\u53d6\u8d39\u7528</p>             </div>         </div>         <div class="section sms-verify-success result-wrap">             <div class="result-subject">                 <span class="result-icon"></span>                 <span class="result-status">\u9a8c\u8bc1\u6210\u529f</span>             </div>             <div class="result-info">\u4f60\u7684\u5e10\u53f7\u5df2\u7ecf\u5b89\u5168\u5566\uff01\u8bf7\u653e\u5fc3\u5730\u7ee7\u7eed\u4f7f\u7528\u8d34\u5427~</div>             <a class="back-btn big-btn">\u597d\u7684</a>         </div>         <div class="section sms-verify-fail result-wrap">             <div class="result-subject">                 <span class="result-icon"></span>                 <span class="result-status">\u9a8c\u8bc1\u5931\u8d25</span>             </div>             <div class="result-info">\u60a8\u8f93\u5165\u7684\u624b\u673a\u53f7\u5df2\u7ecf\u9a8c\u8bc1\u8fc7\u5176\u4ed6\u5e10\u53f7\u5566~</div>             <div class="result-info">\u8bf7\u4f7f\u7528\u5176\u4ed6\u624b\u673a\u53f7\u7ee7\u7eed\u8fdb\u884c\u9a8c\u8bc1</div>             <div class="btn-wrap">                 <a class="resend-btn big-btn">\u91cd\u65b0\u53d1\u9001</a>                 <span class="btn-loading"></span>             </div>         </div>     </div> </div> <div class="ueg-sms-loading">     <div class="loading-icon"></div>     <div class="loading-content">         <p>\u4eb2\uff0c\u6211\u4eec\u6b63\u5728\u52aa\u529b\u83b7\u53d6\u60a8\u7684\u77ed\u4fe1\uff0c</p>         <p>\u6700\u957f\u4f1a\u6709\u4e00\u5206\u949f\u7684\u5ef6\u8fdf\uff0c\u8bf7\u8010\u5fc3\u7b49\u5f85\u54e6~</p>     </div> </div>')({}),
				show: !1,
				holderClassName: "ueg-sms-dialog",
				modalClassName: "ueg-sms-dialog-modal",
				escable: !1,
				showTitle: !1,
				height: 482,
				width: 507
			}), i.$dialog = i.dialog.element, i.dialogCtrl = i.requireInstance("encourage-payment/widget/show_dialog", {
				container: i.dialog,
				type: "top-pop"
			}), i.initDom(), i.initPlaceHolder(), i.initEvent()
		},
		initDom: function() {
			var i = this;
			i.$section = i.$dialog.find(".section"), i.$verifyCode = i.$dialog.find(".verify-code"), i.$verifyWrap = i.$dialog.find(".sms-verify-wrap"), i.$successWrap = i.$dialog.find(".sms-verify-success"), i.$failWrap = i.$dialog.find(".sms-verify-fail"), i.$phone = i.$dialog.find(".sms-verify-phone"), i.$countDown = i.$dialog.find(".count-down"), i.$countDownTime = i.$dialog.find(".count-down-time"), i.$overTime = i.$dialog.find(".over-time"), i.$verifyBtn = i.$dialog.find(".verify-btn"), i.$errorTip = i.$dialog.find(".error-tip"), i.$loadingModal = i.$dialog.find(".ueg-sms-loading")
		},
		initEvent: function() {
			var i = this;
			i.$dialog.on("click", ".dialog-close-btn", function() {
				i.hide()
			}).on("click", ".reverify-btn", function() {
				i.getVcode()
			}).on("click", ".back-btn", function() {
				i.hide()
			}).on("click", ".resend-btn", function() {
				i.$phone.val(""), i.changeBtn(), i.getVcode($(this))
			}), i.$phone.on("input", function() {
				i.phoneInput()
			}).on("blur", function() {
				i.validate()
			}).on("focus", function() {
				i.hideErrorTip()
			}), "oninput" in i.$phone[0] || (i.$phone.tbattr("maxlength", 11), i.$phone.on("propertychange", function(e) {
				var n = e.originalEvent;
				"value" === n.propertyName && i.changeBtn($(this))
			})), i.$verifyBtn.click(function() {
				i.verify($(this))
			})
		},
		phoneInput: function() {
			var i = this,
				e = i.$phone,
				n = i.getInputCursor(e[0]);
			i.startPos = n.start, i.endPos = n.end, e.val(i.format(e.val(), [3, 4, 4])), i.changeBtn(e), i.fixCursor(e[0])
		},
		initPlaceHolder: function() {
			var i = this;
			"placeholder" in document.createElement("input") || setTimeout(function() {
				i.requireInstanceAsync("tbui/widget/placeholder", [i.$phone, i.$phone.tbattr("placeholder"), {
					color: "#ccc",
					fontSize: "12px",
					height: "37px",
					lineHeight: "37px"
				}])
			}, 200)
		},
		show: function() {
			var i = this;
			i.dialogCtrl || (i.initDialog(), $(".ueg-sms-dialog-modal").css("height", $("body").height() + "px")), i.dialogCtrl.show()
		},
		hide: function() {
			var i = this;
			return i.dialog.hide(), "function" == typeof i.opts.onClose ? (i.opts.onClose(i.verifyResult), void 0) : (i.verifyTimer && clearTimeout(i.verifyTimer), i.loadingTimer && clearTimeout(i.loadingTimer), i.loadingTimer = i.verifyTimer = null, i.verifyTimeStamp = i.vocdeTimeStamp = null, i.modalLoading(!1), i.loading(!1), i.startTime = null, i.verifyResult && location.reload(), void 0)
		},
		resetDialog: function() {
			var i = this;
			i.$countDown.show(), i.$overTime.hide(), i.$verifyWrap.is(":hidden") && (i.$section.hide(), i.$verifyWrap.show()), i.countDown()
		},
		toast: function(i) {
			var e = this,
				n = ['<div class="toast-content">', '<span class="toast-icon"></span>', '<span class="toast-msg">' + i + "</span>", "</div>"].join("");
			$.dialog.assert(n, function() {
				$(".ueg-sms-dialog-modal").removeClass("ueg-sms-dialog-modal-nobg")
			}, {
				time: 2e3,
				showTitle: !1,
				button: !1,
				showShadow: !1,
				holderClassName: "ueg-sms-toast",
				width: "auto"
			}), e.$dialog && !e.$dialog.is(":hidden") && $(".ueg-sms-dialog-modal").addClass("ueg-sms-dialog-modal-nobg")
		},
		loading: function(i, e) {
			var n = this;
			i ? (n.isLoading = !0, e && e.length && e.siblings(".btn-loading").addClass("btn-loading-show")) : (n.isLoading = !1, e && e.length && e.siblings(".btn-loading").removeClass("btn-loading-show"))
		},
		modalLoading: function(i, e) {
			var n = $.extend({
					isDelay: !0
				}, e || {}),
				t = this;
			if(i) {
				t.isLoading = !0;
				var a = function() {
					n.content && t.$loadingModal.find(".loading-content").html(n.content), t.$loadingModal.show()
				};
				n.isDelay ? t.loadingTimer = setTimeout(a, 800) : a()
			} else t.isLoading = !1, t.loadingTimer && clearTimeout(t.loadingTimer), t.loadingTimer = null, t.$loadingModal.hide()
		},
		getVcode: function(i) {
			var e = this;
			if(!e.isLoading) {
				e.loading(!0, i);
				var n = e.vcodeTimeStamp = (new Date).getTime();
				$.ajax({
					url: "/mo/q/getsmsvcode",
					type: "get",
					success: function(t) {
						if(e.loading(!1, i), n === e.vcodeTimeStamp) {
							var a = t.data || {};
							if(t.no + "" == "0" && a.vcode) {
								var s = a.vcode;
								(!e.$dialog || e.$dialog.is(":hidden")) && e.show(), e.verifyCode = s, e.$verifyCode.html(s), e.resetDialog()
							} else t.no + "" == "230265" ? e.requireInstance("tbui/widget/LoginDialog", ["", "editor"]) : t.no + "" == "1" ? e.toast("\u8d26\u53f7\u72b6\u6001\u6b63\u5e38\uff0c\u8bf7\u8fd4\u56de\u7ee7\u7eed\u4f7f\u7528\u8d34\u5427") : e.toast("\u9a8c\u8bc1\u7801\u83b7\u53d6\u5931\u8d25\uff0c\u8bf7\u7a0d\u540e\u518d\u8bd5~")
						}
					},
					error: function() {
						e.loading(!1, i), n === e.vcodeTimeStamp && e.toast("\u9a8c\u8bc1\u7801\u83b7\u53d6\u5931\u8d25\uff0c\u8bf7\u7a0d\u540e\u518d\u8bd5~")
					}
				})
			}
		},
		showErrorTip: function(i) {
			var e = this;
			i && (e.$errorTip.html(i), e.$errorTip.css("visibility", "visible"))
		},
		hideErrorTip: function() {
			var i = this;
			i.$errorTip.css("visibility", "hidden")
		},
		validate: function() {
			var i = this;
			i.checkPhone() ? i.hideErrorTip() : i.showErrorTip("\u60a8\u8f93\u5165\u7684\u624b\u673a\u53f7\u683c\u5f0f\u6709\u8bef")
		},
		checkPhone: function() {
			var i = this,
				e = i.$phone.val().replace(/\s/g, "");
			return /^\d{11}$/.test(e)
		},
		changeBtn: function() {
			var i = this;
			i.checkPhone() ? i.$verifyBtn.removeClass("btn-disabled") : i.$verifyBtn.addClass("btn-disabled")
		},
		setInputCursor: function(i, e, n) {
			if(0 > e && (e = 0), 0 > n && (n = 0), e !== n && (e += 1), document.selection) {
				var t = i.createTextRange();
				t.collapse(!0), t.moveEnd("character", n), t.moveStart("character", e), t.select()
			} else i.setSelectionRange(e, n)
		},
		getInputCursor: function(i) {
			if(document.selection) {
				var e = document.selection.createRange();
				return e.moveStart("character", -i.value.length), {
					start: e.text.length,
					end: e.text.length
				}
			}
			return {
				start: i.selectionStart,
				end: i.selectionEnd
			}
		},
		compare2String: function(i, e) {
			var n = i.length,
				t = e.length;
			return n - t
		},
		fixCursor: function(i) {
			var e = this,
				n = e.startPos,
				t = e.endPos,
				a = i.value,
				s = e.compare2String(a, e.oldValue);
			t <= a.length - 1 && " " !== a.charAt(t - 1) && (s = 0), 0 > s && t >= a.length - 1 && (s = 0), e.setInputCursor(i, n + s, t + s), e.oldValue = a
		},
		commonNormalizer: function(i, e, n) {
			if(!i) return "";
			var t = i.split(n).join("");
			return t.length < e ? i : t.match(new RegExp(".{1," + e + "}", "g")).join(n)
		},
		format: function(i, e) {
			var n = this;
			if(!$.isArray(e) || !i) return "";
			if(i = i.split(" ").join(""), i.length < e[0]) return i;
			for(var t = "", a = i, s = "", o = 0; o < e.length; o++) {
				var l = e[o];
				a = a.split(" ").join(""), i = n.commonNormalizer(a, l, " "), t = i.slice(0, l + 1), a = i.slice(l + 1), s += t
			}
			return a.length > 0 && (a = a.split(" ").join(""), i = n.commonNormalizer(a, e[e.length - 1], " "), s += i), s
		},
		countDown: function() {
			var i = this,
				e = 300;
			i.interval && clearInterval(i.interval), i.$countDownTime.html(e + "s"), i.interval = setInterval(function() {
				e--, i.$countDownTime.html(e + "s"), 0 === e && (i.interval && clearInterval(i.interval), i.$countDown.hide(), i.$overTime.show())
			}, 1e3)
		},
		verify: function(i, e) {
			var n = this;
			if((!n.isLoading || e) && !i.hasClass("btn-disabled")) {
				n.hideErrorTip(), n.isLoading || (n.modalLoading(!0), n.startTime = (new Date).getTime());
				var t = n.verifyTimeStamp = (new Date).getTime();
				$.ajax({
					url: "/mo/q/checksmsvcode",
					type: "get",
					data: {
						phone: n.$phone.val().replace(/\s/g, "")
					},
					success: function(e) {
						var a = e.data || {},
							s = (new Date).getTime();
						if(e.no + "" == "291015" && n.startTime && s - n.startTime < 6e4) return n.verifyTimer = setTimeout(function() {
							n.verify(i, !0)
						}, 1e4), void 0;
						if(n.modalLoading(!1), n.startTime = null, t === n.verifyTimeStamp)
							if(e.no + "" == "0") a.check_pass ? (n.$verifyWrap.hide(), n.$successWrap.show(), n.verifyResult = !0) : n.showErrorTip("\u9a8c\u8bc1\u5931\u8d25");
							else if(e.no + "" == "291012") n.$verifyWrap.hide(), n.$failWrap.show();
						else if(e.no + "" == "291013") n.toast("\u64cd\u4f5c\u5df2\u8d85\u65f6\uff0c\u8bf7\u91cd\u65b0\u53d1\u9001\uff01");
						else if(e.no + "" == "230265") n.requireInstance("tbui/widget/LoginDialog", ["", "editor"]);
						else if(e.no + "" == "291015") {
							var o = '\u672a\u6536\u5230\u60a8\u53d1\u9001\u7684\u77ed\u4fe1\u6216\u9a8c\u8bc1\u7801\u53d1\u9001\u9519\u8bef\uff0c\u5982\u679c\u60a8\u786e\u5b9e\u5df2\u7ecf\u53d1\u9001\uff0c\u8bf7\u5c3d\u5feb\u53cd\u9988\u7ed9\u6211\u4eec\u53ca\u65f6\u5e2e\u60a8\u5904\u7406&nbsp;<a href="http://tieba.baidu.com/hermes/feedback">\u53bb\u53cd\u9988</a>';
							n.showErrorTip(o)
						} else e.no + "" == "1" ? n.toast("\u8d26\u53f7\u72b6\u6001\u6b63\u5e38\uff0c\u8bf7\u8fd4\u56de\u7ee7\u7eed\u4f7f\u7528\u8d34\u5427") : n.showErrorTip(e.error || "\u9a8c\u8bc1\u5931\u8d25")
					},
					error: function() {
						n.startTime = null, n.modalLoading(!1), t === n.verifyTimeStamp && n.toast("\u7f51\u7edc\u5f00\u5c0f\u5dee\u4e86~")
					}
				})
			}
		}
	}
});
_.Module.define({
	path: "ueglib/widget/forbidden",
	sub: {
		initial: function(i) {
			var n = i || {};
			this.info = {
				isForbidden: !!n.is_block || !1,
				forbiddenReason: n.block_reason || "",
				forbiddenBy: "bawu" === n.opgroup ? "\u672c\u5427\u5427\u52a1" : "\u7cfb\u7edf",
				unforbiddenPage: "bawu" === n.opgroup ? "bawu" : "system",
				forbiddenDuration: n.days_tofree || 0,
				forbiddenNotice: "bawu" === n.opgroup ? "\u5982\u679c\u5427\u52a1\u4e0d\u5904\u7406\uff0c\u5c31\u53ef\u4ee5\u81ea\u52a8\u89e3\u5c01\u54e6\uff5e" : "",
				isByBlack: n.block_errno + "" == "3250012"
			}
		},
		getForbiddenInfo: function() {
			return {
				isForbidden: this.info.isForbidden,
				forbiddenReason: this.info.forbiddenReason,
				forbiddenBy: this.info.forbiddenBy,
				forbiddenDuration: this.info.forbiddenDuration,
				forbiddenNotice: this.info.forbiddenNotice,
				isByBlack: this.info.isByBlack
			}
		},
		getUnforbiddenIndexLink: function() {
			return "/pmc/index"
		},
		_convertToNumber: function(i) {
			var n = parseInt(i);
			return isNaN(n) ? 0 : n
		},
		getUnforbiddenPageLink: function(i) {
			var n = this._convertToNumber(i);
			return 0 === n ? this.getUnforbiddenIndexLink() : "/pmc/" + this.info.unforbiddenPage + "?fid=" + n
		}
	}
});
_.Module.define({
	path: "poster/widget/poster_context",
	requires: ["ueglib/widget/forbidden", "ueglib/widget/sms_verify_dialog"],
	sub: {
		initial: function(t) {
			var e = this;
			t = $.extend({}, t);
			var i = t.blockInfo;
			window.PosterContext || ! function(t) {
				$(".j_richPosterAppealLink").live("click", function() {
					$.stats.track("posterAppealLink", "uegCount", "bawuAppeal", "click")
				});
				var o = e.requireInstance("ueglib/widget/forbidden", [i]),
					r = o.getForbiddenInfo(),
					a = o.getUnforbiddenPageLink(PageData.forum.id),
					n = "";
				if(r.isForbidden && r.isByBlack) {
					var s = e.requireInstance("ueglib/widget/sms_verify_dialog", [i]);
					n = ["\u60a8\u7684\u8d26\u53f7\u5b58\u5728\u88ab\u76d7\u98ce\u9669\uff0c\u8bf7\u70b9\u51fb\u9a8c\u8bc1\u540e\u7ee7\u7eed\u53d1\u5e16", '<a data-site="richPoster" ', 'style="cursor: pointer;" ', 'class="ueg_pmc-link ueg_track-richPoster ueg-pmc-sms" ', ">\u70b9\u51fb\u9a8c\u8bc1</a>"].join(""), $(".ueg-pmc-sms").live("click", function() {
						s.getVcode()
					})
				} else r.isForbidden && (n = ["\u60a8\u53ef\u80fd\u5b58\u5728\u8fdd\u89c4\u64cd\u4f5c\uff0c\u5df2\u88ab" + r.forbiddenBy + "\u5c01\u7981\uff0c\u53bb", '<a data-site="richPoster" ', 'href="' + a + '" ', 'class="ueg_pmc-link ueg_track-richPoster" ', 'target="_blank">\u7533\u8bf7\u6062\u590d</a>'].join(""));
				var _ = {
					POST_AUTHORIZED: "authorized",
					POST_LOGIN_NEEDED: "\u672c\u5427\u53d1\u8d34\uff0c\u8bf7\u5148 <a href=\"#\" onclick=\"_.Module.use('common/widget/LoginDialog', ['', 'editor']);return false;\">\u767b\u5f55</a> | <a href=\"#\" onclick=\"TbCom.process('User','buildRegisterFrame',null,null,null,'editor');return false;\">\u6ce8\u518c</a>&nbsp;",
					POST_BLOCKED: n,
					POST_LEVEL_LIMITED: '\u62b1\u6b49\uff0c\u6839\u636e\u76f8\u5173\u6cd5\u5f8b\u6cd5\u89c4\u548c\u653f\u7b56\uff0c\u672c\u5427\u76ee\u524d\u4ec5\u5141\u8bb8<a href="//tieba.baidu.com/f/like/level?kw=#{forum_name}&ie=utf-8" target="_blank">4\u7ea7\u5934\u8854</a><br />\u4ee5\u4e0a\u4f1a\u5458\u53d1\u8d34',
					POST_BAWU_LIMITED: "\u62b1\u6b49\uff0c\u672c\u5427\u76ee\u524d\u4ec5\u9650\u5427\u52a1\u56e2\u961f\u53d1\u8d34",
					POST_LAW_LIMITED: "\u62b1\u6b49\uff0c\u6839\u636e\u76f8\u5173\u6cd5\u5f8b\u6cd5\u89c4\u548c\u653f\u7b56\uff0c\u672c\u5427\u76ee\u524d\u53ea\u80fd\u6d4f\u89c8\uff0c\u4e0d\u80fd\u53d1\u8d34",
					POST_QUALIFICATIONS_LIMITED: "\u62b1\u6b49\uff0c\u672c\u5427\u76ee\u524d\u4ec5\u9650\u5427\u52a1\u56e2\u961f\u53ca\u6ce8\u518c\u6ee1\u4e00\u5b9a\u65f6\u95f4\u7684\u8001\u7528\u6237\u53d1\u8d34",
					POST_THREAD_ONLY: "\u62b1\u6b49\uff0c\u6839\u636e\u76f8\u5173\u6cd5\u5f8b\u6cd5\u89c4\u548c\u653f\u7b56\uff0c\u672c\u5427\u76ee\u524d\u53ea\u80fd\u53d1\u4e3b\u9898\u8d34",
					POST_REPLY_ONLY: "\u62b1\u6b49\uff0c\u6839\u636e\u76f8\u5173\u6cd5\u5f8b\u6cd5\u89c4\u548c\u653f\u7b56\uff0c\u672c\u5427\u76ee\u524d\u53ea\u80fd\u53d1\u56de\u590d\u8d34",
					POST_THREAD_LEVEL_LIMITED: "\u62b1\u6b49\uff0c\u6839\u636e\u76f8\u5173\u6cd5\u5f8b\u6cd5\u89c4\u548c\u653f\u7b56\uff0c\u672c\u5427\u76ee\u524d\u4ec5\u5141\u8bb8\u4e00\u5b9a\u7ea7\u522b\u4ee5\u4e0a\u4f1a\u5458\u53d1\u4e3b\u9898\u8d34",
					POST_REPLY_LEVEL_LIMITED: "\u62b1\u6b49\uff0c\u6839\u636e\u76f8\u5173\u6cd5\u5f8b\u6cd5\u89c4\u548c\u653f\u7b56\uff0c\u672c\u5427\u76ee\u524d\u4ec5\u5141\u8bb8\u4e00\u5b9a\u7ea7\u522b\u4ee5\u4e0a\u4f1a\u5458\u53d1\u56de\u590d\u8d34",
					POST_PAD_LIMITED: "\u5207\u6362\u6210pad\u7248\u8d34\u5427\uff0c\u7545\u4eab\u66f4\u987a\u7545\u7684\u53d1\u8d34\u4f53\u9a8c\uff01",
					POST_ONLY_LOUZHU_CAN_REPLY: "\u4e0d\u597d\u610f\u601d\u54e6\uff0c\u672c\u697c\u76ee\u524d\u53ea\u5141\u8bb8\u697c\u4e3b\u56de\u590d\u54e6~<br/>\u5982\u679c\u4f60\u6709\u76f8\u540c\u6216\u5176\u4ed6\u7684\u95ee\u9898\uff0c\u8bf7\u5728\u672c\u5427\u53d1\u8d34\u53cd\u9988\u54e6~",
					context: null,
					authorities: null,
					loadContext: function(t) {
						this.context = t
					},
					loadContextFromPageData: function(t) {
						t.product = "frs";
						var e = ("frs" == t.product, "pb" == t.product);
						this.context = {
							forum: {
								id: t.forum.id,
								name: t.forum.name,
								nameEncoded: encodeURIComponent(t.forum.name)
							},
							user: t.user,
							product: "frs",
							floor: 0,
							tbs: t.tbs,
							isPad: t.is_ipad,
							page: t.page
						}, e && (this.context.thread = {
							id: t.thread.thread_id,
							thread_type: PageData.thread.thread_type
						}, this.context.floor = t.thread.reply_num)
					},
					loadAuthorities: function(t) {
						$.browser.msie && $.browser.version < 8 && (t.long_editor = !1, t.float_editor = !1), this.authorities = t
					},
					getContext: function() {
						return this.context
					},
					getAuthorities: function() {
						return this.authorities
					},
					isPostAllowed: function() {
						return this._validatePostAuthority() == this.POST_AUTHORIZED
					},
					getPostRejectedMessage: function() {
						var t = this._validatePostAuthority();
						return t && t != this.POST_AUTHORIZED ? $.tb.format(t, $.extend({
							forum_name: this.context.forum.name
						}, this.context)) : null
					},
					_validatePostAuthority: function() {
						var t = this.context.user;
						return t.isLogin ? t.isBlocked ? this.POST_BLOCKED : t.canPost ? "pb" == PageData.product && PageData.feedback && 0 != PageData.feedback && PageData.user.name != PageData.thread.author ? this.FORBID_FLAG_MAP[11] : this.context.isPad ? this.POST_PAD_LIMITED : this.POST_AUTHORIZED : this.FORBID_FLAG_MAP[t.forbidFlag] : this.POST_LOGIN_NEEDED
					}
				};
				_.FORBID_FLAG_MAP = {
					1: _.POST_LOGIN_NEEDED,
					2: _.POST_QUALIFICATIONS_LIMITED,
					3: _.POST_LEVEL_LIMITED,
					4: _.POST_BAWU_LIMITED,
					5: _.POST_LAW_LIMITED,
					7: _.POST_REPLY_ONLY,
					8: _.POST_THREAD_ONLY,
					9: _.POST_REPLY_LEVEL_LIMITED,
					10: _.POST_THREAD_LEVEL_LIMITED,
					11: _.POST_ONLY_LOUZHU_CAN_REPLY
				}, t.PosterContext = _
			}(window)
		}
	}
});
_.Module.define({
	path: "encourage-payment/widget/tdou_open_type",
	sub: {
		openTypeList: {
			1001001e3: "dialog",
			2000118: "dialog"
		},
		initial: function() {
			this.normalType = "dialog"
		},
		getOpenType: function(e) {
			var i = this.openTypeList[e] || this.normalType;
			return i
		}
	}
});
_.Module.define({
	path: "user/widget/user_api",
	sub: {
		initial: function() {},
		checkUniversalMembershipOf: function(e) {
			return $.getPageData("mParr_props.level.props_id", 0, e) > 0 && 1e3 * $.getPageData("mParr_props.level.end_time", 0, e) > 1 * new Date
		},
		checkSuperMemberShipOf: function(e) {
			return 2 == this.getUniversalMemberLevelOf(e)
		},
		checkOverdueSuperMembershipOf: function(e) {
			return 2 === +$.getPageData("mParr_props.level.props_id", 0, e) && 1e3 * $.getPageData("mParr_props.level.end_time", 0, e) < +new Date
		},
		checkSingleForumMembershipOf: function(e, r) {
			var t = $.getPageData("mParr_props.forum_member", 0, e);
			return t ? t[r] && 1e3 * t[r].end_time > 1 * new Date : !1
		},
		getUniversalMemberLevelOf: function(e) {
			return this.checkUniversalMembershipOf(e) ? $.getPageData("mParr_props.level.props_id", 0, e) : 0
		}
	}
});
_.Module.define({
	path: "user/widget/icons/icons_card",
	sub: {
		_option: {},
		_j_card: null,
		_open_timer: null,
		_close_timer: null,
		_is_show: !1,
		_is_first_show: !0,
		_default_option: {
			content: "",
			arrow_dir: "down",
			arrow_pos: {},
			card_css: {
				width: 170,
				"z-index": 1001
			},
			arrow_req: !0,
			auto_positon: !1,
			event_target: null,
			offset: {
				x: 0,
				y: 0
			},
			card_leave_display: !1,
			card_hover_show: !0,
			card_leave_hide: !1,
			attr: "",
			wrap: $("body")
		},
		initial: function(o) {
			var i = this;
			i._option = $.extend(!0, {}, i._default_option, o), this._buildCard()
		},
		_buildCard: function() {
			var o = this._option,
				i = this._genericTpl(),
				t = o.wrap;
			this._j_card = $(i), this._j_card.find(".j_content").html(o.content), t.append(this._j_card), delete o.card_css.height, this._j_card.css(o.card_css), o.card_css.height = this._j_card.find(".j_content").outerHeight(!0), this._arrow = this._j_card.find(".j_ui_white_arrow"), void 0 === o.arrow_pos.left && (this._arrow_left = o.card_css.width / 2 - 10, this._arrow.css({
				left: this._arrow_left
			})), this._arrow.css(o.arrow_pos), o.arrow_req || this._j_card.find(".j_ui_white_arrow").hide(), o.auto_positon && this._autoPosition()
		},
		_autoPosition: function() {
			var o = this._option,
				i = {},
				t = $(window).height(),
				e = $(window).width(),
				n = ($(document).scrollLeft(), $(document).scrollTop()),
				_ = (o.event_target.innerWidth(), o.event_target.innerHeight()),
				a = "",
				s = {
					x: o.event_target.offset().left - o.card_css.width / 2 + o.event_target.outerWidth(!0) / 2,
					y: o.event_target.offset().top - o.card_css.height - 10,
					width: this._j_card.innerWidth(),
					height: this._j_card.innerHeight() + this._arrow.innerHeight()
				};
			i.left = s.x, i.top = s.y;
			var c = o.arrow_pos.left || this._arrow_left,
				r = 15,
				l = e;
			e < $(document).width() && (l = $(document).width());
			var d = l - (o.card_css.width + r);
			i.left < r ? (c += i.left - r, i.left = r) : i.left > d && (c += i.left - d, i.left = d), i.top < n ? (a = "up", i.top += _ + (s.height || 0), i.top -= o.offset.y) : (i.top += i.top + _ > n + t ? -_ - (s.height || 0) : 0, a = "down", i.top += o.offset.y), this._arrow.removeClass("icon_white_down").removeClass("icon_white_up").addClass("icon_white_" + a).css({
				left: c
			}), this._j_card.css(i)
		},
		_genericTpl: function() {
			var o = this._option.attr,
				i = this._option.arrow_dir,
				t = ['<div class="icon_card_wrap" ' + o + ' style="visibility: hidden">', '<div class="j_content icon_card_content ">', "</div>", '<span class="j_ui_white_arrow arrow icon_white_' + i + '"></span>', "</div>"].join("");
			return t
		},
		showCard: function(o) {
			var i = this;
			i._close_timer && clearTimeout(i._close_timer), o && "delayShow" == o.type ? (i._open_timer && clearTimeout(i._open_timer), i._open_timer = setTimeout(function() {
				i._showCardDo()
			}, o.time)) : i._showCardDo()
		},
		closeCard: function(o) {
			var i = this;
			i._open_timer && clearTimeout(i._open_timer), o && "delayClose" == o.type ? i._close_timer = setTimeout(function() {
				i._closeCardDo()
			}, o.time) : i._closeCardDo()
		},
		hideCard: function(o) {
			var i = this;
			i._open_timer && clearTimeout(i._open_timer), o && "delayHide" == o.type ? i._close_timer = setTimeout(function() {
				i._hideCardDo()
			}, o.time) : i._hideCardDo()
		},
		_showCardDo: function() {
			var o = this;
			o._is_first_show, this._j_card.css({
				visibility: "visible"
			})
		},
		_closeCardDo: function() {
			var o = this;
			this._j_card && !this._is_show && o._j_card.remove()
		},
		_hideCardDo: function() {
			var o = this;
			this._j_card && !this._is_show && o._j_card.css({
				visibility: "hidden"
			})
		},
		setContent: function(o) {
			var i = this._option;
			if(null !== this._j_card) {
				var t = this._j_card.find(".j_content");
				t.html(o), i.card_css.height = t.outerHeight(!0), this._j_card.css({
					height: i.card_css.height
				}), i.auto_positon && this._autoPosition()
			}
		}
	}
}), _.Module.define({
	requires: ["user/widget/icons/icons_book_common"],
	path: "user/widget/icons/icons_book_view",
	sub: {
		tabIconsContentCongfig: {},
		_collect_icon_title: {
			101: "\u96c6\u9f5032\u4e2a\u56fd\u65d7\u5370\u8bb0\u5956\u52b1\u3010\u8d34\u5427\u4e16\u754c\u676f\u3011\u5370\u8bb0",
			102: "\u96c6\u9f5012\u4e2a\u661f\u5ea7\u5370\u8bb0\u53ef\u4ee5\u83b7\u5f9712\u4e2a\u9ec4\u91d1\u7248\u661f\u5ea7\u5370\u8bb0",
			103: "",
			104: ""
		},
		spriteImgSize: 36,
		initial: function() {},
		_getTabPanelTpl: function() {
			var o = ['<div id="icon_book_wrap" class="_j_icon_book_wrap">', '<div  class="icon_book">', '<div class="icon_book_tab">', '<ul  class="icon_book_tab_head">', "#{tabHead}", "</ul>", '<div id="tab_body"  class="icon_book_tab_body">', "#{tabContent}", "</div>", "</div>", "</div>", '<div class="icon_book_close"></div>', "</div>"].join("");
			return o
		},
		getTabItem: function(o) {
			var i = this,
				t = ['<li id="tab_head_#{index}" data-categoryId="#{category_id}" class="tab_deactive">', '<div class="head_inner #{separator_cls}">', '<button type="button" class="tab_button" hidefocus="true"  > ', '<a href="javascript:void(0)">#{title}</a></button></div></li>'].join(""),
				e = ['<div id="tab_content_#{index}" class=" tab_body_item ">', "</div>"].join(""),
				n = "",
				_ = "",
				a = 0;
			for(var s in o) a++;
			var c = 0;
			for(var s in o) {
				var r = {
					index: c,
					category_id: s,
					title: o[s].name,
					separator_cls: c == a - 1 ? "" : "space"
				};
				c++, n += $.tb.format(t, r), _ += $.tb.format(e, r)
			}
			var l = {
					tabHead: n,
					tabContent: _
				},
				d = i._getTabPanelTpl();
			return $.tb.format(d, l)
		},
		getTabContent: function(o, i, t) {
			var e = "",
				n = "",
				_ = this,
				a = 0,
				s = 0;
			if(o = o || {}, o.normal && !o.advanced) {
				var c = o.normal || [],
					r = c.length;
				return a = 5, s = 1 >= r / 50 ? 10 : r % a == 0 ? Math.floor(r / a) : Math.floor(r / a) + 1, e += _._getPositionIconListHtml(c, s, i, t), n = _._getCommIconWrap(null, a, s, e), _.tabIconsContentCongfig.comm = {
					row: a,
					col: 10,
					total_col: s
				}, n
			}
			if(o.advanced && o.advanced) {
				var c = o.normal || [],
					l = o.advanced || [],
					r = c.length,
					d = l.length,
					u = "";
				return a = 2, s = 1 >= r / 20 ? 10 : r % a == 0 ? Math.floor(r / a) : Math.floor(r / a) + 1, e += _._getPositionIconListHtml(c, s, i, t), n = _._getCommIconWrap(null, a, s, e), _.tabIconsContentCongfig.comm = {
					row: a,
					col: 10,
					total_col: s
				}, n += _._getDownArrowHtml(), s = 1 >= d / 20 ? 10 : r % 2 == 0 ? Math.floor(d / 2) : Math.floor(d / 2) + 1, u += _._getPositionIconListHtml(l, s, null, t), n += _._getAdvancedIconWrap(null, a, s, u, t), _.tabIconsContentCongfig.adv = {
					row: a,
					col: 10,
					total_col: s
				}, n
			}
			return n
		},
		_getCommIconWrap: function(o, i, t, e) {
			var n = {
					arrow_top: 5 == i ? 100 : 45,
					arrow_visiblity: t > 10 ? "visible" : "hidden",
					height_cls: 5 == i ? "icon_wrap_5" : "",
					icon_list: e,
					total_col: t
				},
				_ = ['<div class="icon_wrap #{height_cls}">', '<div class="icon_wrap_scroll_arrow icon_wrap_left_arrow arrow_disable" style="visibility: #{arrow_visiblity}">', '<div class="left_arrow arrow_block" style=" top:#{arrow_top}px;"></div></div>', '<div class="icon_view"  total-col="#{total_col}">', '<div class="icon_list_wrap" >', '<ul class="icon_list" style="left: 0px;" >', "#{icon_list}", "</ul>", "</div>", "</div>", '<div class="icon_wrap_scroll_arrow icon_wrap_right_arrow " style="visibility: #{arrow_visiblity}">', '<div class=" right_arrow arrow_block "  style=" top:#{arrow_top}px;"></div></div>', "</div>"].join("");
			return $.tb.format(_, n)
		},
		_getAdvancedIconWrap: function(o, i, t, e, n) {
			var _ = this,
				a = {
					title: _._collect_icon_title[n],
					arrow_visiblity: t > 10 ? "visible" : "hidden",
					icon_list: e,
					total_col: t
				},
				s = ['<div class="collect_icon_wrap">', '<div class="collect_icon_title"><span>#{title}</span></div>', '<div class="collect_wrap">', '<div class="icon_wrap_scroll_arrow icon_wrap_left_arrow arrow_disable" style="visibility: #{arrow_visiblity}">', '<div class="  left_arrow arrow_block" style="top:45px;"></div></div>', '<div class="icon_view" total-col="#{total_col}">', '<div class="icon_list_wrap" >', '<ul class="icon_list" style="left: 0px;" >', "#{icon_list}", "</ul>", "</div>", "</div>", '<div class="icon_wrap_scroll_arrow icon_wrap_right_arrow  " style="visibility: #{arrow_visiblity}">', '<div class=" right_arrow arrow_block "  style=" top:45px;"></div></div>', "</div>", "</div>"].join("");
			return $.tb.format(s, a)
		},
		_getDownArrowHtml: function() {
			return '<div class="wrap_donw_arrow"></div>'
		},
		_getPositionIconListHtml: function(o, i, t, e) {
			for(var n = "", _ = this, a = !1, s = o.length, c = 0, r = 0, l = 0; s > l; l++) {
				c = Math.floor(l / i), r = l % i;
				var d = 55 * c,
					u = 55 * r;
				a = t && t == o[l].name ? !0 : !1;
				var b = "";
				b = 0 == o[l].is_advanced ? _._getCommonIconTpl(o[l], d, u, e, a) : _._getAdvIconTpl(o[l], d, u, e), n += b
			}
			return n
		},
		_getCommonIconTpl: function(o, i, t, e, n) {
			var _ = this,
				a = o.sprite[o.value].split(","),
				s = "//tb1.bdstatic.com/tb/cms/com/icon/" + e + "_" + _.spriteImgSize + ".png",
				c = 50,
				r = a[0],
				l = a[1],
				d = 0,
				u = l * c,
				b = "background: url(" + s + "?stamp=" + r + ") no-repeat -" + u + "px -" + d + "px;",
				v = {
					icon_top: i,
					icon_left: t,
					name: o.name,
					in_use: o.in_use,
					in_use_cls: 1 == o.in_use ? "" : " icon_not_use",
					selected_cls: n ? " icon_selected" : "",
					level: o.value,
					background: b,
					locked_cls: 0 == o.in_use ? " icon_locked" : ""
				};
			_._judgeCommIconInSlot(o) && (v.selected_cls = "icon_selected");
			var p = ["<li>", '<div id="icon_book_id_#{name}" data-id="#{name}" data-level="#{level}" class="icon_box_place #{in_use_cls}" style="top: #{icon_top}px; left: #{icon_left}px;">', '<div class="icon_box icon_border "></div>', '<div class="icon_box icon_icon" style="#{background}"></div>', '<div class="j_icon_subscript icon_subscript #{selected_cls} #{locked_cls}" ></div>', "</div>", "</li>"].join("");
			return $.tb.format(p, v)
		},
		_judgeCommIconInSlot: function(o) {
			var i = this,
				t = o.name,
				e = {};
			for(var n in e) {
				if("1" == n && $.isEmptyObject(e[n])) {
					var _ = this._getOldIconinfoInSlot();
					if(t == _) return !0
				}
				if(e[n].name == t) {
					i.common = this.requireInstance("user/widget/icons/icons_book_common");
					var a = i.common.isShowDurationIcon(o);
					return a ? !0 : !1
				}
			}
			return !1
		},
		_getOldIconinfoInSlot: function() {
			var o = $(".j_icon_slot").first();
			if(o) {
				var i = o.tbattr("data-slot");
				return i
			}
			return null
		},
		_getAdvIconTpl: function(o, i, t, e) {
			var n = this,
				_ = o.sprite[o.value].split(","),
				a = 50,
				s = _[0],
				c = _[1],
				r = 2 * a,
				r = 0,
				l = c * a,
				d = "//tb1.bdstatic.com/tb/cms/com/icon/" + e + "_" + n.spriteImgSize + ".png",
				u = "background: url(" + d + "?stamp=" + s + ") no-repeat -" + l + "px -" + r + "px;",
				b = o.is_collected,
				v = {
					icon_top: i,
					icon_left: t,
					name: o.name,
					in_use: o.in_use,
					clocked_cls: 1 == b ? " " : " icon_locked",
					level: o.value,
					background: u
				},
				p = ["<li>", '<div id="icon_book_id_#{name}" data-id="#{name}" data-level="#{level}" class="icon_box_place " style="top: #{icon_top}px; left: #{icon_left}px;">', '<div class="icon_box icon_border "></div>', '<div class="icon_box icon_icon" style="#{background}"></div>', '<div class="icon_subscript #{clocked_cls}" ></div>', "</div>", "</li>"].join("");
			return $.tb.format(p, v)
		},
		_judgeAdvIconLocked: function(o, i) {
			var t = !1;
			switch(i = parseInt(i)) {
				case 101:
					break;
				case 102:
					if(o) {
						for(var e = 0; e < o.length; e++)
							if(!o[e].in_use) {
								t = !0;
								break
							}
						t = 12 == e && 0 == t ? !1 : !0
					} else t = !0;
					break;
				case 103:
					break;
				case 104:
			}
			return t
		}
	}
}), _.Module.define({
	requires: ["user/widget/icons/icons_book_common", "user/widget/icons/icons_book_messagebox"],
	path: "user/widget/icons/icons_book_tip",
	sub: {
		_icon_book_tip: null,
		_icon_data: null,
		_ajax: null,
		_control: null,
		_msgbox: null,
		_option: {
			width: "535px"
		},
		_is_show: !1,
		spriteImgSize: 36,
		initial: function(o) {
			var i = this;
			i.common = this.requireInstance("user/widget/icons/icons_book_common"), i._control = o[0]
		},
		getControl: function() {
			return this._control
		},
		showTip: function(o, i) {
			if(o) {
				var t = this,
					e = $("#icon_book_tip");
				0 == e.length && $(".icon_card_wrap").append(this._getWrapTpl()), e = $("#icon_book_tip"), t._setContent(o);
				var n = $(".j_icon_book_tip .j_tip_up_arrow"),
					a = i.position(),
					s = a.top,
					c = a.left - 5,
					r = i.parents(".icon_view"),
					l = r.position(),
					d = parseInt(l.left) + 15,
					u = s + 106;
				i.parents(".collect_wrap").length > 0 && (u += 146), e.css({
					display: "block",
					visibility: "visible",
					top: u + "px",
					left: d + "px",
					"z-index": 2e4
				});
				var b = parseInt(c) + 25;
				n.css({
					left: b + "px"
				}), t._bindEvents(), $(".icon_book_tip .j_tip_icon_price").html("\u6d88\u8017" + o.icon_info.price + "T\u8c46"), t._icon_data = o, $("#j_icon_book_action_btn").one("click", function() {
					var i = !0,
						e = 0,
						n = PageData.user.Parr_scores;
					n && (e = n.scores_other + n.scores_money);
					var a = -1;
					if(a = t._icon_data.price ? t._icon_data.price : t._icon_data.icon_info.price, a > 0 && 0 > e - a && (i = !1, $(".icon_book_tip .icon_action_wrap").html(t._getNoRemainTip()), $("#j_icon_book_recharge_btn").click(function() {
							_.Module.use("common/widget/TchargeDialog")
						})), o.in_use) 1 == parseInt(o.slot_no) ? t._replaceIcon4FirstSlot(o) : t._replaceIcon4OtherSlot(o);
					else if(i) {
						var s = $("#j_icon_book_action_btn em");
						s.length > 0 && s.html("\u8d2d\u4e70\u4e2d"), t._buyIconRequest(o)
					}
				})
			}
		},
		hideTip: function() {
			var o = this;
			o._is_show || o.closeTip()
		},
		closeTip: function() {
			tip = $("#icon_book_tip"), (tip || 0 != tip.length) && tip.remove()
		},
		_bindEvents: function() {
			var o = $("#icon_book_tip"),
				i = this;
			o.bind("mouseenter", function() {
				i._is_show = !0
			}).bind("mouseleave", function() {
				i._is_show = !1, i.hideTip()
			})
		},
		_replaceIcon4FirstSlot: function(o) {
			var i = this;
			i._control.closeIconBook(), i._msgbox || (i._msgbox = i.requireInstance("user/widget/icons/icons_book_messagebox"));
			var t = $(".icon_wrap .icon_slot_refresh");
			i._msgbox.showReplaceFirstSlotBox(o, t, i._replaceIcon4OtherSlot, i)
		},
		_replaceIcon4OtherSlot: function(o) {
			var i = this,
				t = {
					ie: "utf-8"
				};
			t.tbs = PageData.tbs, t.icon_name = o.icon_id, t.slot_no = o.slot_no, i._ajax && i._ajax.abort(), i._ajax = $.ajax({
				type: "post",
				url: "/icon/seticon",
				data: t,
				dataType: "json"
			}).success(function(o) {
				if(o && 0 === o.no) {
					var t = o.data;
					i._refreshAfterReplace(t.icon_info)
				} else o && 2270028 === o.no ? (i._msgbox || (i._msgbox = i.requireInstance("user/widget/icons/icons_book_messagebox")), i._msgbox.hasNotEnoughTdou()) : o && 2380009 === o.no ? $.dialog.alert("\u540c\u540dicon\u53ea\u80fd\u4f69\u6234\u4e00\u4e2a\uff01") : $.dialog.alert("\u672a\u77e5\u9519\u8bef\uff0c\u8bf7\u5237\u65b0\u91cd\u8bd5\uff01")
			})
		},
		_refreshAfterReplace: function() {
			var o = this;
			setTimeout(function() {
				o.closeTip()
			}, 0), o._msgbox || (o._msgbox = o.requireInstance("user/widget/icons/icons_book_messagebox")), o._msgbox.replaceIconSuccess(o)
		},
		_buyIcon: function(o) {
			var i = this;
			i._control.closeIconBook(), i._msgbox || (i._msgbox = i.requireInstance("user/widget/icons/icons_book_messagebox"));
			var t = $(".icon_wrap .icon_slot_refresh");
			i._msgbox.showBuyIconBox(o, t, i._buyIconRequest, i)
		},
		_buyIconRequest: function(o) {
			var i = this,
				t = {
					ie: "utf-8"
				};
			t.tbs = PageData.tbs, t.icon_name = o.icon_id, t.level = o.value, i._ajax && i._ajax.abort(), i._ajax = $.ajax({
				type: "post",
				url: "/icon/buyIcon",
				data: t,
				dataType: "json"
			}).success(function(o) {
				if(o && 0 === o.no) {
					var t = o.data;
					parr = PageData.user.Parr_scores, parr.scores_fetch = t.scores_fetch || 0, parr.scores_money = t.scores_money || 0, parr.scores_other = t.scores_other || 0, parr.scores_total = t.scores_total, $(".j_userinfo_scores_num").html(parr.scores_money + parr.scores_other);
					for(var e = $(".tab_body_item_active .icon_view .icon_box_place"), n = 0; n < e.length; n++) {
						var _ = $(e[n]);
						if(_.tbattr("data-id") == t.icon_name) {
							_.removeClass("icon_not_use"), _.find(".j_icon_subscript").removeClass("icon_locked"), i.closeTip();
							break
						}
					}
				} else o && 2270028 === o.no && (i._msgbox || (i._msgbox = i.requireInstance("user/widget/icons/icons_book_messagebox")), i._msgbox.hasNotEnoughTdou())
			})
		},
		_refreshAfterBuy: function(o) {
			this._refreshAfterReplace(o)
		},
		_setContent: function(o) {
			var i = this._getTpl(o);
			$("#icon_book_tip").html(i)
		},
		_getWrapTpl: function() {
			var o = ['<div id="icon_book_tip" class="icon_tip_card_wrap">', "</div>"].join("");
			return o
		},
		_getNoRemainTip: function() {
			var o = ['<div class="icon_action" style="padding-top: 10px">', '<div class="j_tip_icon_price tip_icon_price" style="height: 12px; margin-bottom:5px;display: block">T\u8c46\u4e0d\u8db3</div>', '<a href="javascript:void(0)" id="j_icon_book_recharge_btn" class="ui_btn ui_btn_m" style="height: 27px; border-radius: 3px;"><span><em>\u5145\u503c</em></span></a>', "</div>"].join("");
			return o
		},
		_getTpl: function(o) {
			var i = this,
				t = o.icon_info,
				e = t.sprite[t.value].split(","),
				n = 50,
				_ = e[0],
				a = e[1],
				s = 0,
				c = a * n,
				r = "//tb1.bdstatic.com/tb/cms/com/icon/" + t.category_id + "_" + i.spriteImgSize + ".png",
				l = " background:url(" + r + "?stamp=" + _ + ") no-repeat -" + c + "px -" + s + "px;",
				d = "",
				u = i.common.getIconExpired(t);
			u > -1 && (d = '<span style="margin-left: 20px;">\u5269\u4f59\u65f6\u95f4\uff1a' + u + "\u5929</span>");
			var b = t.title,
				v = t.intro,
				p = t.intro_url,
				h = {
					background_img: l,
					desc_title: b + d || "\u5370\u8bb0",
					desc_detail: v || "",
					desc_link: p || "//tieba.baidu.com/",
					btn_value: o.in_use ? "\u66ff\u6362" : "\u8d2d\u4e70",
					price_info_display: 1 == o.in_use ? "none" : "block",
					padding_top: o.in_use ? "20" : "10",
					in_use_display: "none",
					in_use_text: "",
					button_display: 0 == o.in_use && 0 == t.price ? "none" : "block"
				};
			i._judgeCommIconInSlot(o.icon_id) && (h.button_display = "none"), "none" == h.button_display && (h.in_use_display = "display", h.in_use_text = "\u4f7f\u7528\u4e2d", h.price_info_display = "none"), 0 == o.in_use && 0 == t.price && (h.in_use_text = "\u6d3b\u52a8\u83b7\u53d6");
			var m = ['<div class="icon_book_tip j_icon_book_tip">', '<div class="tip_up_arrow j_tip_up_arrow"></div>', '<div class="tip_body">', '<div class="tip_icon">', '<div class="tip_icon_img" style="#{background_img}}"></div>', "</div>", '<div class="icon_desc">', '<div class="icon_desc_title"><span>#{desc_title}</span></div>', '<div class="icon_desc_detail"><span>#{desc_detail}</span><a href="#{desc_link}"  target="_blank"><span style="padding-left:5px;">\u8be6\u60c5 >></span></a></div>', "</div>", '<div class="icon_action_wrap">', '<div class="icon_action" style="padding-top:#{padding_top}px">', '<div class="j_tip_icon_price tip_icon_price" style="height: 12px; margin-bottom:5px;display: #{price_info_display}"></div>', '<div class="j_tip_icon_use tip_icon_use" style=" margin-bottom:5px;display: #{in_use_display}">#{in_use_text}</div>', '<a href="javascript:void(0)" id="j_icon_book_action_btn" class="ui_btn ui_btn_m icon_book_action_btn" style="height: 27px; border-radius: 3px;display: #{button_display}"><span><em>#{btn_value}</em></span></a>', "</div>", "</div>", "</div>", "</div>"].join("");
			return $.tb.format(m, h)
		},
		_judgeCommIconInSlot: function(o) {
			var i = {};
			for(var t in i) {
				var e = this.common.isShowDurationIcon(i[t]);
				if(i[t].name == o && e) return !0
			}
			return !1
		}
	}
}), _.Module.define({
	requires: ["user/widget/icons/icons_book_common", "user/widget/icons/icons_card"],
	path: "user/widget/icons/icons_book_messagebox",
	sub: {
		_icon_book_message_box: null,
		_icon_data: null,
		_is_show: !1,
		_option: {
			width: 290
		},
		is_leave_close: !1,
		spriteImgSize: 36,
		setLeaveClose: function(o) {
			this.is_leave_close = o
		},
		initial: function() {
			this.common = this.requireInstance("user/widget/icons/icons_book_common")
		},
		showBox: function(o, i) {
			var t = this;
			t._showBox(i), t.generatorBuySlot(o), t._bindEvents()
		},
		hideBox: function() {
			var o = this;
			o._is_show || o._icon_book_message_box && (o._icon_book_message_box.closeCard(), o._icon_book_message_box = null)
		},
		_bindEvents: function() {
			var o = this,
				i = $(".icon_card_wrap");
			i.bind("mouseenter", function() {
				o.is_leave_close && (o._is_show = !0)
			}), i.bind("mouseleave", function() {
				o.is_leave_close && (o._is_show = !1, o.hideBox())
			})
		},
		generatorBuySlot: function(o) {
			var i = this,
				t = i._getBuySlotTpl(o);
			$(".icon_book_msgbox_body").html(t), $(".icon_book_msgbox .ui_btn").one("click", function() {
				i.buySlot(o)
			})
		},
		showReplaceFirstSlotBox: function(o, i, t, e) {
			var n = this;
			setTimeout(function() {
				e.closeTip()
			}, 0), n._showBox(i);
			var _ = n._getReplaceFirstSlotTipTpl(o);
			$(".icon_book_msgbox_body").html(_), $(".icon_book_msgbox .ui_btn").click(function() {
				t.call(e, o)
			})
		},
		showBuyIconBox: function(o, i, t, e) {
			var n = this;
			setTimeout(function() {
				e.closeTip()
			}, 0), n._showBox(i);
			var a = n._getBuyIconTpl(o);
			$(".icon_book_msgbox_body").html(a), $(".icon_book_msgbox .ui_btn").click(function() {
				var i = 0,
					a = PageData.user.Parr_scores;
				if(a && (i = a.scores_other + a.scores_money), i - o.icon_info.price < 0) {
					var s = n._hasNotEnoughTdou();
					return $(".icon_book_msgbox_body").html(s), $(".j_tdou_not_enough").on("click", function() {
						_.Module.use("common/widget/TchargeDialog")
					}), void 0
				}
				t.call(e, o.icon_info, function() {
					var o = n._buyIconSuccess();
					$(".icon_book_msgbox_body").html(o)
				})
			})
		},
		buySlot: function(o) {
			var i = this,
				t = 0,
				e = PageData.user.Parr_scores;
			e && (t = e.scores_other + e.scores_money + e.scores_fetch);
			var n = -1;
			if(n = o.price ? o.price : o.icon_info.price, n > 0 && 0 > t - n) {
				var a = i._hasNotEnoughTdou();
				return $(".icon_book_msgbox_body").html(a), $(".j_tdou_not_enough").on("click", function() {
					_.Module.use("common/widget/TchargeDialog")
				}), void 0
			}
			var s = {
				ie: "utf-8",
				slot_no: o.add_slot_no || 1
			};
			s.tbs = PageData.tbs, i._ajax && i._ajax.abort(), i._ajax = $.ajax({
				type: "post",
				url: "/icon/addslot",
				data: s,
				dataType: "json"
			}).success(function(o) {
				if(o && 0 === o.no) {
					var t = o.data,
						e = i._addSuccess();
					$(".icon_book_msgbox_body").html(e), i._refreshSlotList(), t.scores_other || 0, t.scores_money || 0, i._updateTdouAccount(t.scores_other, t.scores_money, t.scores_fetch)
				} else if(o && 2270028 === o.no) i.hasNotEnoughTdou();
				else {
					var n = '<div class="icon_book_error">\u672a\u77e5\u9519\u8bef<a href="javascript:void(0)" id="icon_book_reload" class="icon_book_reload">\u5237\u65b0</a></div>';
					$(".icon_book_msgbox_body").html(n), $("#icon_book_reload").on("click", function() {
						return $.tb.location.reload(), !1
					})
				}
			})
		},
		_updateTdouAccount: function(o, i, t) {
			var e = PageData.user.Parr_scores;
			e && (e.scores_other = o, e.scores_money = i, e.scores_fetch = t, $(".j_userinfo_scores_num").html(o + i))
		},
		_showBox: function(o) {
			var i = this;
			i.hideBox();
			var t = i._getTpl(),
				e = {
					content: t,
					card_css: {
						width: i._option.width,
						zIndex: $.getcurzIndex()
					},
					auto_positon: !0,
					event_target: o,
					attr: "id='icon_book_message_box'",
					wrap: $("body")
				};
			i._icon_book_message_box = i.requireInstance("user/widget/icons/icons_card", e), i._icon_book_message_box.showCard({
				type: "delayShow",
				time: 200
			}), i._bindCloseEvent()
		},
		_bindCloseEvent: function() {
			var o = this;
			$(".icon_book_msgbox .icon_book_msgbox_close").click(function() {
				o._icon_book_message_box ? (o._icon_book_message_box.closeCard(), o._icon_book_message_box = null) : $("#icon_book_message_box").length > 0 && $("#icon_book_message_box").remove(), $(".icon_wrap .j_icon_slot_refresh").removeClass("icon_slot_refresh")
			}), $(".icon_book_msgbox .icon_book_msgbox_close").hover(function() {
				$(this).addClass("icon_book_msgbox_close_hover")
			}, function() {
				$(this).removeClass("icon_book_msgbox_close_hover")
			})
		},
		_getTpl: function() {
			var o = ['<div class="icon_book_msgbox">', '<div class="icon_book_msgbox_wrap">', '<div class="icon_book_msgbox_body">', "</div>", '<div class="icon_book_msgbox_close"></div>', "</div>", '<div class="icon_book_down_arrow"></div>', "</div>"].join("");
			return o
		},
		_refreshSlotList: function() {
			var o = $(".j_icon_slot").length,
				i = 28 * o,
				t = '<a href="javascript:void(0)" data-slot="' + (o + 1) + '" data-name="" title="\u70b9\u51fb\u6dfb\u52a0\u5370\u8bb0" class="j_slot_null_icon j_icon_slot icon_slot_null_icon" style="top:0px;left:' + i + 'px"><div class=" j_icon_slot_refresh"></div></a>';
			$(".icon_slot_wrap .icon_add_solt").css({
				left: 28 * (o + 1)
			}), $(".icon_slot_wrap .icon_add_solt").before(t), 8 == $(".j_icon_slot").length && $(".icon_add_solt").remove()
		},
		_addSuccess: function() {
			var o = ['<div class="icon_msgbox_title"></div>', '<div class="icon_msgbox_detail">\u606d\u559c\u60a8\u83b7\u5f97\u4e86\u4e00\u679a\u5370\u8bb0\u63d2\u69fd</div>'].join("");
			return o
		},
		_buyIconSuccess: function() {
			var o = ['<div class="icon_msgbox_title">\u606d\u559c\u60a8\u83b7\u5f97\u4e86\u4e00\u679a\u65b0\u5370\u8bb0</div>', '<div class="icon_msgbox_detail"></div>', '<div class="icon_msgbox_action">', '<a href="javascript:void(0)" class="ui_btn ui_btn_m j_tdou_not_enough" style="height: 27px; border-radius: 3px;"><span><em>\u5feb\u53bb\u56fe\u9274\u770b\u770b\u5427</em></span></a>', "</div>"].join("");
			return o
		},
		_replaceIconSuccess: function() {
			var o = ['<div class="icon_msgbox_title">\u5370\u8bb0\u66ff\u6362\u6210\u529f</div>', '<div class="icon_msgbox_detail"></div>', '<div class="icon_msgbox_action">', '<a  href="javascript:void(0)" class="ui_btn ui_btn_m j_replace_ok" style="height: 27px; border-radius: 3px;"><span><em>\u786e\u5b9a</em></span></a>', "</div>"].join("");
			return o
		},
		_hasNotEnoughTdou: function() {
			var o = ['<div class="icon_msgbox_title">T\u8c46\u4e0d\u8db3</div>', '<div class="icon_msgbox_detail"></div>', '<div class="icon_msgbox_action">', '<a href="javascript:void(0)" class="ui_btn ui_btn_m j_tdou_not_enough" style="height: 27px; border-radius: 3px;"><span><em>\u7acb\u5373\u5145\u503c</em></span></a>', "</div>"].join("");
			return o
		},
		_getBuySlotTpl: function(o) {
			var i = {
					price: o.price
				},
				t = ['<div class="icon_msgbox_title">\u9700\u8981\u6d88\u8017#{price}T\u8c46\u5f00\u542f\u5370\u8bb0\u63d2\u69fd</div>', '<div class="icon_msgbox_detail" style="padding-top:15px;">(\u5f00\u542f\u540e\u514d\u8d39\u66f4\u6362\u5370\u8bb0)</div>', '<div class="icon_msgbox_action" style="padding-top: 25px;">', '<a href="javascript:void(0)" class="ui_btn ui_btn_m" style="height: 27px; border-radius: 3px;"><span><em>\u5f00\u542f</em></span></a>', "</div>"].join("");
			return $.tb.format(t, i)
		},
		_getReplaceFirstSlotTipTpl: function(o) {
			var i = this,
				t = o.old_icon_info,
				e = o.icon_info,
				n = this.common.isShowDurationIcon(t),
				_ = n ? i._getIconBackground(t) : "",
				a = i._getIconBackground(e),
				s = {
					old_background: _,
					background: a
				},
				c = ['<div class="icon_msgbox_title">\u70b9\u51fb\u66ff\u6362\u5f53\u524d\u5370\u8bb0</div>', '<div class="icon_msgbox_icon_replace_detail">', '<div class="msg_icon_replace_current" style="#{old_background}"></div>', '<div class="msg_icon_replace_arrow"></div>', '<div class="msg_icon_replace_new" style="#{background}"></div>', "</div>", '<div class="icon_msgbox_action">', '<a href="javascript:void(0)" class="ui_btn ui_btn_m" style="height: 27px; border-radius: 3px"><span><em>\u66ff\u6362</em></span></a>', "</div>"].join("");
			return $.tb.format(c, s)
		},
		_getIconBackground: function(o) {
			var i = 0,
				t = 0,
				e = "//tb1.bdstatic.com/tb/cms/com/icon/" + o.category_id + "_" + this.spriteImgSize + ".png";
			if(o) {
				var n = o.sprite[o.value].split(","),
					_ = 50,
					a = n[0],
					s = n[1];
				i = 0, t = s * _;
				var c = "background: url(" + e + "?stamp=" + a + ") no-repeat -" + t + "px -" + i + "px;";
				return c
			}
			return ""
		},
		_getBuyIconTpl: function(o) {
			var i = this,
				t = i._getIconBackground(o.icon_info),
				e = {
					price: o.icon_info.price,
					background: t
				},
				n = ['<div class="icon_msgbox_title">\u9700\u8981\u6d88\u801710000T\u8c46\u8d2d\u4e70\u8be5\u5370\u8bb0</div>', '<div class="icon_msgbox_icon_buy">', '<div class="msg_icon_buy_icon" style="#{background}}"></div>', "</div>", '<div class="icon_msgbox_action">', '<a href="javascript:void(0)" class="ui_btn ui_btn_m">', "<span><em>\u8d2d\u4e70</em></span>", "</a>", "</div>"].join("");
			return $.tb.format(n, e)
		},
		hasNotEnoughTdou: function(o) {
			var i = this;
			o || (o = $(".icon_wrap .j_icon_slot_refresh")), i._showBox(o);
			var t = i._hasNotEnoughTdou();
			$(".icon_book_msgbox_body").html(t), $(".j_tdou_not_enough").on("click", function() {
				_.Module.use("common/widget/TchargeDialog")
			})
		},
		replaceIconSuccess: function(o) {
			var i = this,
				t = $(".icon_wrap .icon_slot_refresh");
			t && (t = t.parent()), i._showBox(t);
			var e = i._replaceIconSuccess();
			if($(".icon_book_msgbox_body").html(e), $(".icon_book_msgbox_body .j_replace_ok").on("click", function() {
					$.tb.location.reload()
				}), $(".icon_book_msgbox .icon_book_msgbox_close").click(function() {
					$.tb.location.reload()
				}), o) {
				var n = o.getControl();
				n && n.closeIconBook()
			}
		}
	}
}), _.Module.define({
	requires: ["user/widget/icons/icons_book_common"],
	path: "user/widget/icons/icons_book_get_icon",
	sub: {
		_dialog: null,
		initial: function() {
			this.common = this.requireInstance("user/widget/icons/icons_book_common")
		},
		get: function() {
			return this._dialog
		},
		show: function() {
			this._dialog.show()
		},
		hide: function() {
			this._dialog.hide()
		},
		close: function() {
			this._dialog.close()
		},
		_init: function(o) {
			var i = {
					modal: !0,
					showTitle: !1,
					fixed: !0,
					width: 290,
					height: 180
				},
				t = this;
			i.html = '<div class="icon_book_dialog_wrap">' + o + "</div>", this._dialog = new $.dialog(i), this._dialog.element.find(".icon_book_dialog_wrap .icon_book_msgbox_close").click(function(o) {
				o.preventDefault(), t._dialog.close()
			}), this._dialog.element.find(".icon_book_dialog_wrap .icon_book_msgbox_close").hover(function() {
				$(this).addClass("icon_book_msgbox_close_hover")
			}, function() {
				$(this).removeClass("icon_book_msgbox_close_hover")
			})
		},
		getOneIcon: function(o) {
			var i = this;
			if(!o) return i._handleError(), void 0;
			var t = {
				ie: "utf-8"
			};
			t.tbs = PageData.tbs, t.icon_name = o, i._ajax && i._ajax.abort(), i._ajax = $.ajax({
				type: "post",
				url: "/icon/seticon",
				data: t,
				dataType: "json"
			}).success(function(o) {
				if(o && 0 === o.no) {
					var t = o.data;
					if(!t.icon_info) return i._handleError(), void 0;
					i.showOneIcon(t.icon_info)
				} else o && 2380009 === o.no ? $.dialog.alert("\u540c\u540dicon\u53ea\u80fd\u4f69\u6234\u4e00\u4e2a\uff01") : i._handleError()
			})
		},
		_handleError: function() {
			var o = this,
				i = o._getErrorTpl();
			o._init(i), o.show(), this._dialog.element.find(".icon_book_dialog_wrap .ui_btn").click(function() {
				$.tb.location.reload()
			})
		},
		showOneIcon: function(o) {
			var i = this,
				t = i._getOneIconTpl(o);
			i._init(t), i.show()
		},
		_getOneIconTpl: function(o) {
			if(o) {
				var i = this._getIconStyle(o),
					t = {
						styleBg: i,
						iconTitle: o.title
					},
					e = ['<div class="icon_book_msgbox">', '<div class="icon_book_msgbox_wrap">', '<div class="icon_book_msgbox_body">', '<div class="icon_msgbox_title">\u606d\u559c\u4f60\u83b7\u5f97\u4e86#{iconTitle}</div>', '<div class="icon_msgbox_get_icon">', '<div class="msg_icon_get_one" style="left:110px;background: #{styleBg}"></div>', '<div class="msg_icon_get_two"></div>', '<div class="msg_icon_get_three"></div>', "</div>", '<div class="icon_msgbox_action">', '<a href="javascript:void(0)" class="ui_btn ui_btn_m">', "<span><em>\u5feb\u53bb\u770b\u770b\u6211\u7684\u56fe\u9274</em></span>", "</a>", "</div>", "</div>", '<div class="icon_book_msgbox_close"></div>', "</div>", "</div>"].join("");
				return $.tb.format(e, t)
			}
		},
		showDurationIcon: function(o, i) {
			var t = [];
			t.push(o), this.showIconList(t, i, "duration")
		},
		showIconList: function(o, i, t) {
			var e = this,
				n = {
					hide_btn: !1,
					close_callback: function() {},
					close_time: 0
				};
			n = $.extend(n, i);
			var _ = e._getIconListTpl(o, n.hide_btn, t);
			e._init(_), e.show(), n.close_time && parseInt(n.close_time) > 0 && setTimeout(function() {
				e._dialog.close()
			}, parseInt(n.close_time)), n.close_callback && "function" == typeof n.close_callback && e._dialog.onclose(function() {
				n.close_callback()
			})
		},
		_getIconListTpl: function(o, i, t) {
			var e = this,
				n = PageData.user.portrait;
			if(o || $.isArray(o)) {
				for(var _ = [], a = [], s = "", c = i ? "" : ['<div class="icon_msgbox_action">', '<a href="javascript:void(0)" class="ui_btn ui_btn_m">', "<span><em>\u5feb\u53bb\u770b\u770b\u6211\u7684\u56fe\u9274</em></span>", "</a>", "</div>"].join(""), r = 0; r < o.length; r++) {
					var l = e._getIconFormatInfo(o[r], o.length);
					_.push(l.iconTitle), a.push(l.iconTpl)
				}
				if(_ = _.join(","), a = a.join(""), t && "duration" == t) {
					var d = this.common.getIconExpired(o[0]);
					d > -1 && (s = "<span>\u6709\u6548\u5929\u6570\uff1a" + d + "</span><br>")
				}
				var u = ['<div class="icon_book_msgbox">', '<div class="icon_book_msgbox_wrap">', '<div class="icon_book_msgbox_body">', '<div class="icon_msgbox_title">\u606d\u559c\u4f60\u83b7\u5f97\u4e86' + _ + "</div>", '<div class="icon_msgbox_get_icon clearfix">', a, "</div>", c, '<p class="icon_book_go_home">', s, '<a href="/home/main?id=' + n + '&fr=icon" target="_blank">\u53bb\u6211\u7684\u4e2a\u4eba\u4e2d\u5fc3\u67e5\u770b>></a>', "</p>", "</div>", '<div class="icon_book_msgbox_close"></div>', "</div>", "</div>"].join("");
				return u
			}
		},
		_getIconFormatInfo: function(o, i) {
			var t = this._getIconStyle(o),
				e = {
					iconTpl: '<div class="msg_icon_get msg_icon_get_' + parseInt(i) + '" style="left:110px;' + t + '"></div>',
					styleBg: t,
					iconTitle: o.title
				};
			return e
		},
		_getIconStyle: function(o) {
			var i = 0,
				t = 0,
				e = "//tb1.bdstatic.com/tb/cms/com/icon/icon_sprite.png",
				n = o.sprite[o.value].split(","),
				_ = 50,
				a = n[0],
				s = n[1];
			i = 2 * _, t = s * _;
			var c = "background: url(" + e + "?stamp=" + a + ") no-repeat -" + t + "px -" + i + "px;";
			return c
		},
		_getErrorTpl: function() {
			var o = ['<div class="icon_book_msgbox">', '<div class="icon_book_msgbox_wrap">', '<div class="icon_book_msgbox_body">', '<div class="icon_msgbox_title">\u672a\u77e5\u9519\u8bef</div>', '<div class="icon_msgbox_action">', '<a href="javascript:void(0)" class="ui_btn ui_btn_m" style="height: 27px; border-radius: 3px;">', "<span><em>\u5237\u65b0</em></span>", "</a>", "</div>", "</div>", '<div class="icon_book_msgbox_close"></div>', "</div>", "</div>"].join("");
			return o
		}
	}
}), _.Module.define({
	requires: ["user/widget/icons/icons_book_view", "user/widget/icons/icons_book_messagebox", "user/widget/icons/icons_card", "user/widget/icons/icons_book_tip"],
	path: "user/widget/icons/icons_book_control",
	sub: {
		_icon_book: null,
		_icon_book_ajax: null,
		_icon_user_action: "",
		_icon_tab_loaded: {},
		_tip: null,
		_messagebox: null,
		tabLen: 0,
		_slot_no: 0,
		_icon_info: {},
		_current_tab_index: 0,
		_selected_icon_name: "",
		_target_ele: null,
		_option: {
			width: 655
		},
		_slot_buy_price: [0, 0, 100, 1e4, 3e4, 5e4, 1e4, 2e4, 1e5],
		initial: function() {
			var o = this;
			o._wrap = $("body"), o._view = o.requireInstance("user/widget/icons/icons_book_view");
			var i = PageData.category_info,
				t = i.category_list || [{
					category_id: "101",
					category_name: "\u8db3\u7403"
				}, {
					category_id: "102",
					category_name: "\u661f\u5ea7"
				}, {
					category_id: "104",
					category_name: "\u5176\u4ed6"
				}];
			o.defaultCategoryId = o._getDefaultCategoryId(i.default_category), o.bindIconBookHookEvents(t)
		},
		bindIconBookHookEvents: function(o) {
			var i = this;
			i._wrap.delegate(".j_icon_slot_buy", "mouseenter", function() {
				i.__timeoutId && clearTimeout(i.__timeoutId), i.closeAllCard(), i._icon_user_action = "buy_slot", i._target_ele = $(this), i._selected_icon_name = "";
				var o = $(".j_icon_slot").length;
				return i._slot_no = 1, i.buySlot({
					add_slot_no: o + 1,
					price: i._slot_buy_price[o + 1],
					action: "buy_slot"
				}, $(this)), !1
			}), i._wrap.delegate(".j_icon_slot_buy", "mouseleave", function() {
				return i.__timeoutId && clearTimeout(i.__timeoutId), i.__timeoutId = setTimeout(function() {
					i._messagebox && i._messagebox.hideBox()
				}, 200), !1
			}), i._wrap.delegate(".j_icon_slot", "click", function(t) {
				i.closeAllCard(), i._setIconRefresh($(this)), i._icon_user_action = "replace_icon", i._target_ele = $(this);
				var e = $(this).tbattr("data-slot"),
					n = $(this).tbattr("data-name");
				i._selected_icon_name = n, i._slot_no = e;
				var _ = "",
					a = {};
				for(var s in a) a[s].name == n && (_ = a[s].category_id);
				i.initIconBook({
					slot_no: e,
					category_info: o,
					icon_id: n,
					action: "replace_icon",
					category_id: _
				}, $(this)), t.preventDefault()
			}), i._wrap.delegate(".j_slot_null_icon", "click", function(t) {
				t.preventDefault(), i.closeAllCard(), i._selected_icon_name = "", i._setIconRefresh($(this)), i._icon_user_action = "buy_icon", i._target_ele = $(this);
				var e = $(this).tbattr("data-slot");
				i._slot_no = e, i.initIconBook({
					slot_no: e,
					category_info: o,
					icon_id: "",
					action: "buy_icon"
				}, $(this))
			}), i._wrap.delegate(".j_icon_slot", "hover", function(o) {
				var i = $(this);
				if(!i.hasClass("j_slot_null_icon")) {
					var t = $(this).tbattr("data-name"),
						e = ($(this).tbattr("data-slot"), {});
					if(e) {
						var n = null;
						for(var _ in e)
							if(e[_].name == t) {
								n = e[_];
								break
							}
						if(n && n["level_" + n.value]) {
							var a = n["level_" + n.value],
								s = "url(" + a.icon_1 + ") no-repeat",
								c = o || event;
							if("mouseenter" == c.type) {
								var r = {
										background: s
									},
									l = i.css("background");
								l || (l = i[0].style.background), i.data({
									bg: l
								}), i.css(r), i.addClass("icon_slot_hover"), i.children(".j_icon_slot_refresh").addClass("icon_slot_refresh_hover")
							} else {
								var l = i.data("bg"),
									r = {
										background: l
									};
								i.css(r), i.removeClass("icon_slot_hover"), i.children(".j_icon_slot_refresh").removeClass("icon_slot_refresh_hover")
							}
						}
					}
				}
			})
		},
		buySlot: function(o, i) {
			var t = this;
			t._messagebox || (t._messagebox = t.requireInstance("user/widget/icons/icons_book_messagebox")), t._messagebox.is_leave_close = !0, t._messagebox.showBox(o, i)
		},
		initIconBook: function(o, i) {
			var t = this,
				e = o.category_info;
			t.closeIconBook();
			var n = t._view.getTabItem(e),
				_ = {
					content: n,
					card_css: {
						width: t._option.width,
						zIndex: $.getcurzIndex()
					},
					auto_positon: !0,
					event_target: i,
					attr: "id='icon_book_tab'",
					wrap: $("body")
				};
			if(t._icon_book = t.requireInstance("user/widget/icons/icons_card", _), t._icon_book.showCard({
					type: "delayShow",
					time: 200
				}), t.initTab(), o.icon_id) {
				var a = t._getTabIdByCategory(o.category_id);
				t._selected_icon_name = o.icon_id, t._showTab(a, o.icon_id)
			} else t._showTab(t._getDefaultIndex(t.defaultCategoryId))
		},
		closeIconBook: function() {
			var o = this;
			o._tip && o._tip.closeTip(), o._icon_book && (o._icon_book.closeCard(), o._icon_book = null)
		},
		initTab: function() {
			var o = this;
			o.tabLen = $(".icon_book_tab_head li").length, o._bindHeadEvents()
		},
		_bindHeadEvents: function() {
			var o = this;
			$(".icon_book_tab_head").delegate("li", "click", function() {
				var i = $(this).index();
				o._showTab(i), o._tip && o._tip.hideTip()
			}), $(".icon_book_close").click(function() {
				return $("#icon_book_tab").remove(), o._tip && (o._tip.hideTip(), o._tip = null), $(".icon_wrap .j_icon_slot_refresh").removeClass("icon_slot_refresh"), !1
			}), $(".icon_book_close").hover(function() {
				$(this).addClass("icon_book_close_hover")
			}, function() {
				$(this).removeClass("icon_book_close_hover")
			})
		},
		_showTab: function(o, i) {
			var t = this;
			$(".icon_book_tab_head .head_inner").each(function() {
				!$(this).hasClass("space") && $(this).parent().index() < t.tabLen - 1 && $(this).addClass("space")
			}), 0 > o ? "0" : $("#tab_head_" + (o - 1) + " div.space").removeClass("space"), $(".icon_book_tab_head li.tab_active").removeClass("tab_active").addClass("tab_deactive"), $("#tab_head_" + o).removeClass("tab_deactive").addClass("tab_active"), $(".icon_book_tab_body div.tab_body_item_active").removeClass("tab_body_item_active"), $("#tab_content_" + o).addClass("tab_body_item_active"), i = i || t._selected_icon_name, t._loadTabContent(o, i), t._current_tab_index = i
		},
		_loadTabContent: function(o, i) {
			var t = this,
				e = '<div class="icon_book_error">\u6b63\u5728\u52aa\u529b\u52a0\u8f7d\uff0c\u8bf7\u7a0d\u540e...</div>';
			$("#tab_content_" + o).html(e);
			var n = {
					ie: "utf-8"
				},
				_ = $("#tab_head_" + o).tbattr("data-categoryId");
			n.tbs = PageData.tbs, n.category_id = _, t._icon_book_ajax && t._icon_book_ajax.abort(), t._icon_book_ajax = $.ajax({
				type: "post",
				url: "/icon/submit/icon",
				data: n,
				dataType: "json"
			}).success(function(e) {
				if(e && 0 === e.no) {
					var n = e.data,
						a = n.icon_info,
						s = t._view.getTabContent(a, i, _);
					$("#tab_content_" + o).html(s), t._bindTabContenEvent(o), t.initScroll(o), t._icon_tab_loaded[o] = !0, t._icon_info["category_" + o] = n.icon_info
				} else {
					var s = '<div class="icon_book_error">\u672a\u77e5\u9519\u8bef<a href="javascript:void(0)" id="icon_book_reload" class="icon_book_reload">\u5237\u65b0</a></div>';
					$("#tab_content_" + o).html(s), $("#icon_book_reload").on("click", function() {
						return t._loadTabContent(o), !1
					})
				}
			})
		},
		_bindTabContenEvent: function() {
			var o = this;
			o._tip || (o._tip = o.requireInstance("user/widget/icons/icons_book_tip", [o]));
			var i = $("#icon_book_wrap");
			i.on("mouseenter", ".tab_body_item_active .icon_box_place", function() {
				$(this).children(".icon_border").addClass("icon_border_hover")
			}).on("mouseleave", ".tab_body_item_active .icon_box_place", function() {
				$(this).children(".icon_border").removeClass("icon_border_hover")
			}), i.delegate(".icon_wrap .icon_box_place", "mouseenter", function() {
				var i = o._target_ele.tbattr("data-name"),
					t = $(this).tbattr("data-id"),
					e = $(this).tbattr("data-level"),
					n = $(this).hasClass("icon_not_use"),
					_ = $(".icon_book .tab_body_item_active")[0].id.replace("tab_content_", ""),
					a = o._icon_info["category_" + _],
					s = null,
					c = null;
				if(a) {
					a = a.normal || [];
					for(var r = 0; r < a.length; r++) a[r].name == t && (s = a[r]), i && a[r].name == i && (c = a[r])
				}
				var l = {
					icon_id: t,
					in_use: !n,
					slot_no: o._slot_no,
					value: e,
					icon_info: s,
					old_icon_id: i,
					old_icon_info: c
				};
				o._tip.showTip(l, $(this))
			}), i.delegate(".icon_view", "mouseleave", function() {
				setTimeout(function() {
					o._tip && o._tip.hideTip && o._tip.hideTip()
				}, 1500)
			}), i.delegate(".collect_icon_wrap .icon_box_place", "mouseenter", function() {
				if(!($(this).children(".icon_locked").length > 0)) {
					var i = o._target_ele.tbattr("data-name"),
						t = $(this).tbattr("data-id"),
						e = $(this).tbattr("data-level"),
						n = $(this).hasClass("icon_not_use"),
						_ = $(".icon_book .tab_body_item_active")[0].id.replace("tab_content_", ""),
						a = o._icon_info["category_" + _],
						s = null,
						c = null;
					if(a) {
						a = a.advanced || [];
						for(var r = 0; r < a.length; r++) a[r].name == t && (s = a[r]), i && a[r].name == i && (c = a[r])
					}
					var l = {
						icon_id: t,
						in_use: !n,
						slot_no: o._slot_no,
						value: e,
						icon_info: s,
						old_icon_id: i,
						old_icon_info: c
					};
					o._tip.showTip(l, $(this))
				}
			}), i.delegate(".collect_icon_wrap .icon_box_place", "mouseleave", function() {
				setTimeout(function() {
					o._tip.hideTip()
				}, 6e3)
			})
		},
		_getTabIdByCategory: function(o) {
			for(var i = this, t = $(".icon_book_tab_head li"), e = 0; e < t.length; e++)
				if($(t[e]).tbattr("data-categoryId") == o) return e;
			return i._getDefaultIndex(i.defaultCategoryId)
		},
		_getDefaultCategoryId: function(o) {
			var i = "";
			for(var t in o) i = t;
			return i
		},
		_getDefaultIndex: function(o) {
			for(var i = $(".icon_book_tab_head li"), t = 0; t < i.length; t++)
				if($(i[t]).tbattr("data-categoryId") == o) return t
		},
		initScroll: function(o) {
			var i = this,
				t = $("#tab_content_" + o + " .icon_wrap");
			t && t.length > 0 && i.bindArrowScrollEvent("icon_wrap");
			var e = $("#tab_content_" + o + " .collect_icon_wrap");
			e && e.length > 0 && i.bindArrowScrollEvent("collect_icon_wrap")
		},
		bindArrowScrollEvent: function(o) {
			var i = this;
			$("." + o).delegate(".icon_wrap_scroll_arrow", "hover", function() {
				$(this).hasClass("arrow_disable") || $(this).toggleClass("arrow_hover")
			}), $("." + o).delegate(".right_arrow", "click", function() {
				i._move("left", o), i._tip && i._tip.hideTip()
			}), $("." + o).delegate(".left_arrow", "click", function() {
				i._move("right", o), i._tip && i._tip.hideTip()
			})
		},
		_move: function(o, i) {
			var t = this,
				e = 0,
				n = $($(".tab_body_item_active ." + i + " .icon_view")[0]).tbattr("total-col");
			switch(n = parseInt(n), o) {
				case "left":
					e = t._moveLeft(n, i);
					break;
				case "right":
					e = t._moveRight(n, i)
			}
			e && $(".tab_body_item_active .icon_wrap .icon_list").animate({
				left: e
			}, 300);
			var _ = 55 * n;
			e && (e = Math.abs(parseInt(e)), e + 550 >= _ ? ($(".tab_body_item_active ." + i + " .icon_wrap_right_arrow").addClass("arrow_disable"), $(".tab_body_item_active ." + i + " .icon_wrap_left_arrow").removeClass("arrow_disable")) : ($(".tab_body_item_active ." + i + " .icon_wrap_right_arrow").removeClass("arrow_disable"), $(".tab_body_item_active ." + i + " .icon_wrap_left_arrow").removeClass("arrow_disable")), 0 == e && ($(".tab_body_item_active ." + i + " .icon_wrap_right_arrow").removeClass("arrow_disable"), $(".tab_body_item_active ." + i + " .icon_wrap_left_arrow").addClass("arrow_disable")))
		},
		_moveLeft: function(o, i) {
			var t = 0,
				e = o;
			if(!(10 >= e)) {
				var n = 55 * e,
					_ = $(".tab_body_item_active ." + i + " .icon_list").css("left"),
					a = Math.abs(parseInt(_));
				a % 55 != 0 && (a = a % 55 * 55);
				var s = n - a;
				if(s > 550) return t = a + 165, "-" + t + "px"
			}
		},
		_moveRight: function(o, i) {
			var t = 0,
				e = o;
			if(!(10 >= e)) {
				var n = $(".tab_body_item_active ." + i + " .icon_list").css("left"),
					_ = parseInt(n);
				if(!(_ >= 0)) return t = Math.abs(_) - 165, 0 > t && (t = 0), "-" + t + "px"
			}
		},
		closeAllCard: function() {
			var o = this;
			o._tip && o._tip.closeTip(), o._messagebox && o._messagebox.hideBox(), o.closeIconBook(), o._removeIconRefresh()
		},
		_setIconRefresh: function(o) {
			$(".icon_wrap .j_icon_slot_refresh").removeClass("icon_slot_refresh"), o.children(".j_icon_slot_refresh").addClass("icon_slot_refresh")
		},
		_removeIconRefresh: function() {
			$(".icon_wrap .j_icon_slot_refresh").removeClass("icon_slot_refresh")
		}
	}
}), _.Module.define({
	path: "user/widget/icons/icons_book_common",
	requires: [],
	sub: {
		initial: function() {},
		isDurationIcon: function(o) {
			return o ? 4 == o.type ? !0 : !1 : !1
		},
		getIconExpired: function(o) {
			var i = -1;
			if(!o) return i;
			var t = o.type,
				e = o.end_time,
				n = (new Date).getTime() / 1e3;
			return 4 == t && e >= n && (i = ((e - n) / 86400).toFixed(1)), i
		},
		isShowDurationIcon: function(o) {
			if(!o) return !1;
			var i = o.type,
				t = o.end_time,
				e = (new Date).getTime() / 1e3;
			return 4 != i ? !0 : t >= e ? !0 : !1
		}
	}
}), _.Module.define({
	path: "user/widget/icons",
	requires: ["user/widget/user_api", "user/widget/icons/icons_book_common"],
	sub: {
		iconClassList: {
			0: "",
			1: "icon-crown-vip",
			2: ["icon-crown-super-vip", "icon-crown-super-v1", "icon-crown-super-v2", "icon-crown-super-v3", "icon-crown-super-v4", "icon-crown-super-v5"],
			3: ["icon-crown-year-vip", "icon-crown-year-v1", "icon-crown-year-v2", "icon-crown-year-v3", "icon-crown-year-v4", "icon-crown-year-v5"]
		},
		overdueSuperIconList: ["icon-crown-super-non", "icon-crown-super-non1", "icon-crown-super-non2", "icon-crown-super-non3", "icon-crown-super-non4", "icon-crown-super-non5"],
		initial: function() {
			this._buySlot = $(".j_icon_slot_buy"), this._icon_book_wrap = $(".j_book_icon"), this.common = this.requireInstance("user/widget/icons/icons_book_common"), PageUnit.load("icons_category"), this.userApi = this.requireInstance("user/widget/user_api", [])
		},
		getCrownIconClass: function(o, i) {
			var t = $.getPageData("vipInfo.v_level", 0, o),
				e = this.userApi.getUniversalMemberLevelOf(o),
				n = $.getPageData("vipInfo.v_status", 0, o);
			n = parseInt(n, 10), e = 3 === n ? 3 : e;
			var _ = "";
			if(i) {
				if(this.userApi.checkOverdueSuperMembershipOf(o)) return this.overdueSuperIconList[t];
				if(0 === e) return _ = "icon-crown-super-non"
			}
			switch(e) {
				case 0:
					_ = this.iconClassList[e];
					break;
				case 1:
					_ = this.iconClassList[e];
					break;
				case 2:
				case 3:
					_ = this.iconClassList[e][t]
			}
			return _
		},
		getPreIconHtml: function(o, i, t) {
			var e = {};
			e.mParr_props = o, i = i || e;
			var n, _ = ["\u8d34\u5427\u4f1a\u5458", "\u8d34\u5427\u8d85\u7ea7\u4f1a\u5458"],
				a = "",
				s = Math.round((new Date).getTime() / 1e3),
				c = ((new Date).getTime(), $.getPageData("forum.id", 0)),
				r = "";
			return this.userApi.checkSingleForumMembershipOf(i, c) && (a = '<div class="pre_icon_wrap pre_icon_wrap_theme"><a class="icon_tbworld icon-vip3-16" title="\u672c\u5427\u4f1a\u5458" href="/tbmall/tshow" onclick="return false" target="_blank"></a></div>'), o && o.level && o.level.end_time > s ? (r = this.getCrownIconClass(i), a = '<div class="pre_icon_wrap pre_icon_wrap_theme1">', n = $.getPageData("level.props_id", 0, o), a += '<a class="icon_tbworld ' + r + '" href="/tbmall/tshow" target="_blank" title="' + _[n - 1] + '"></a>', a += "</div>") : t && (r = this.getCrownIconClass(i, !0), a = '<span class="pre_icon_wrap pre_icon_wrap_theme1">', n = $.getPageData("level.props_id", 0, o), a += '<a class="icon_tbworld ' + r + '" href="/tbmall/tshow" target="_blank" title="' + _[n - 1] + '"></a>', a += "</span>"), a
		},
		getTbvipIconHtml: function(o, i, t) {
			i = i ? i : 1, t = t ? t : "";
			var e = "";
			return o && o.type && (e = '<span class="tbvip_icon_wrap tbvip_icon_wrap_theme' + i + " " + t + '"><a class="icon_tbvip icon_tbvip_type' + o.type + '" href="/tbvip/index"target="_blank" title="' + o.intro + '"></a></span>'), e
		},
		getIconsHtml: function(o, i, t, e) {
			var n, _ = $("<div>"),
				t = t ? t : 5,
				a = o.new_iconinfo,
				s = 0;
			for(var c in a) s++;
			var r = '<span class="icon_wrap  icon_wrap_theme1">',
				l = 0;
			if(!a) {
				var d = o.iconinfo;
				if(d) {
					var u = d[0];
					n = this._getOldHtml(u, 1), r += e ? _.html($(n).tbattr("data-field", this.getCommonIconDataNeed(u)).addClass("j_icon_slot")).html() : n
				}
			}
			for(var b in a) {
				var v = a[b];
				if(l == t) break;
				if($.isEmptyObject(v)) {
					if("1" == b) {
						var d = o.iconinfo;
						if(!$.isEmptyObject(d)) {
							var u = this._getReplaceIcon(d, a);
							if(!u) continue;
							n = this._getOldHtml(u, 1), r += e ? _.html($(n).tbattr("data-field", this.getCommonIconDataNeed(u)).addClass("j_icon_slot")).html() : n, l++
						}
					}
				} else this.common.isShowDurationIcon(v) && (n = this._getIconHtml(v, 1), r += e ? _.html($(n).tbattr("data-field", this.getCommonIconDataNeed(v)).addClass("j_icon_slot")).html() : n, l++)
			}
			return r += "</span>"
		},
		_getReplaceIcon: function(o, i) {
			if($.isEmptyObject(i)) return o[0];
			for(var t = 0; t < o.length; t++) {
				var e = o[t];
				if(!this._judgeIconInNewiconinfo(i, e)) return e
			}
			return null
		},
		_judgeIconInNewiconinfo: function(o, i) {
			if($.isEmptyObject(o)) return !1;
			if($.isEmptyObject(i)) return !1;
			for(var t in o) {
				var e = o[t];
				if(e && e.name == i.name) return !0
			}
			return !1
		},
		_imgSize: {
			1: 14,
			2: 18
		},
		_oldIconTitle: {
			is_lottery_1: "\u94c1\u724c\u4e16\u754c\u676f\u8fbe\u4eba",
			is_lottery_2: "\u94dc\u724c\u4e16\u754c\u676f\u8fbe\u4eba",
			is_lottery_3: "\u94f6\u724c\u4e16\u754c\u676f\u8fbe\u4eba",
			is_lottery_4: "\u91d1\u724c\u4e16\u754c\u676f\u8fbe\u4eba",
			is_coreuser_1: "\u8d34\u5427\u6838\u5fc3\u7528\u6237",
			is_verify_1: "\u767e\u5ea6\u8d34\u5427\u5b98\u65b9\u5e73\u53f0\u8ba4\u8bc1",
			user_type_1: "\u8d34\u5427\u5b9e\u540d\u8ba4\u8bc1",
			is_battle_1: "\u8d34\u5427\u62f3\u738b",
			is_welfare_1: "\u798f\u5229\u5370\u8bb0"
		},
		_getOldHtml: function(o, i) {
			var t = "",
				e = o.sprite[o.value];
			if(!e)
				for(var n in o.sprite) {
					if(o.sprite[n] && (0 != o.value || "meizhi_level" == o.name)) {
						e = o.sprite[n];
						break
					}
					return t
				}
			var _ = o.icon + "?stamp=" + e.split(",")[0];
			switch(background = 'style="background: url(' + _ + ") no-repeat center center; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=" + _ + ',sizingMethod=scale); background-size: 14px 14px"', o.name) {
				case "meizhi_level":
					var a = o.value;
					a = a ? a : 0, a >= 2 && (a -= 2, t += '<a class="old_icon_size" ' + background + ' class="maizhi_link" href="/p/' + o.meizhi_thread_id + '" target="_blank" title="\u8d34\u5427\u59b9\u7eb8\u8ba4\u8bc1"><span class="icon_meizhi meizhi_level_' + a + '"></span></a>');
					break;
				case "is_member":
					t += '<a class="old_icon_size" ' + background + ' target="_blank"  class=" icon_fanclub"  title="\u7c89\u4e1d\u4f1a\u5458"></a>';
					break;
				default:
					t += o.title_url ? '<a class="old_icon_size" ' + background + ' target="_blank"  href="' + o.title_url + '"  title="' + o.title + '"  locate="' + o.name + "_" + o.value + '"> </a>' : '<span class="old_icon_size" ' + background + ' title="' + this._oldIconTitle[o.name + "_" + o.value] + '"  locate="' + o.name + "_" + o.value + '"></span>'
			}
			return t
		},
		_getIconHtml: function(o, i) {
			var t, e, n, _, a, i = i || 1,
				s = 50,
				c = "",
				r = "//tb1.bdst",
				l = r + "atic.com/tb/cms/com/icon/";
			if(t = o.sprite[o.value], !t)
				for(var d in o.sprite) {
					if(o.sprite[d] && (0 != o.value || "meizhi_level" == o.name)) {
						t = o.sprite[d];
						break
					}
					return c
				}
			e = t.split(","), n = e[0], _ = e[1];
			var u = l + o.category_id + "_" + this._imgSize[i] + ".png?stamp=" + n;
			switch(a = 'style="background: url(' + u + ") no-repeat -" + _ * s + "px  -" + (i - 1) * s + 'px;"', o.name) {
				case "meizhi_level":
					var b = o.value;
					b = b ? b : 0, b >= 2 && (b -= 2, c += "<a " + a + ' class="maizhi_link" href="/p/' + o.meizhi_thread_id + '" target="_blank" title="\u8d34\u5427\u59b9\u7eb8\u8ba4\u8bc1"><span class="icon_meizhi meizhi_level_' + b + '"></span></a>');
					break;
				case "is_member":
					c += "<a " + a + ' target="_blank"  class=" icon_fanclub" ></a>';
					break;
				default:
					if(o.title_url) c += "<a " + a + ' target="_blank"  href="' + o.title_url + '"  title="' + o.title + '"  locate="' + o.name + "_" + o.value + '"> </a>';
					else {
						{
							o.title
						}
						c += "<span " + a + ' title="' + o.title + '"  locate="' + o.name + "_" + o.value + '"></span>'
					}
			}
			return c
		},
		getCommonIconDataNeed: function(o) {
			var i = {};
			return i.name = o.name, i.end_time = o.end_time, i.category_id = o.category_id, i.slot_no = o.slot_no, i.title = o.title, i.intro = o.intro, i.intro_url = o.intro_url, i.price = o.price, i.value = o.value, i.sprite = o.sprite, JSON.stringify(i)
		}
	}
});
! function() {
	var e = {},
		a = {};
	_.Module.define({
		path: "encourage-payment/widget/base_user_data",
		requires: [],
		sub: {
			initial: function(r) {
				r && (r = $.extend({}, r), e = r.scores || e, a = r.level || a)
			},
			route: {
				getTdou: "//tieba.baidu.com/tbmall/getUserTd"
			},
			_item_cache_last_total_tdou: 0,
			_parrScores: null,
			_parrProps: null,
			getUserName: function() {
				return PageData.user.name || PageData.user.name_url
			},
			getUserTdou: function() {
				var e = window.EncourageData.userScore,
					a = (PageData.user, this._parrScores || e);
				return a && !$.isEmptyObject(a) ? a.scores_money + a.scores_other : 0
			},
			getShowName: function() {
				return PageData.user.name_show || PageData.user.user_name
			},
			isMemeber: function() {
				var e = this._getMaxLevel(a);
				return !!e
			},
			getMemberLevel: function() {
				var e = this._getMaxLevel(a);
				return e
			},
			getMemberIcon: function() {
				var e = e || window.EncourageData.userLevel,
					a = this._getMaxLevelExpire(e),
					r = this.getMemberIconByLevel(a);
				return r
			},
			getMemberIconByLevel: function(e) {
				var a = this;
				e && (e = parseInt(e));
				var r = "",
					t = "",
					n = "";
				switch(e) {
					case -1:
						r = " icon-vip1-gray-18 base_member_icon", t = "\u8d34\u5427\u4f1a\u5458", n = "\u7eed\u8d39\u8d34\u5427\u4f1a\u5458";
						break;
					case 1:
						r = " icon-vip1-18 base_member_icon", t = "\u7eed\u8d39\u8d34\u5427\u4f1a\u5458", n = "\u5f00\u901a\u8d34\u5427\u4f1a\u5458";
						break;
					case -2:
						r = " icon-vip2-gray-18 base_member_icon", t = "\u7eed\u8d39\u8d34\u5427\u8d85\u7ea7\u4f1a\u5458", n = "\u5f00\u901a\u8d34\u5427\u8d85\u7ea7\u4f1a\u5458";
						break;
					case 2:
						r = " icon-vip2-18 base_member_icon", t = "\u8d34\u5427\u8d85\u7ea7\u4f1a\u5458", n = "\u7eed\u8d39\u8d34\u5427\u8d85\u7ea7\u4f1a\u5458";
						break;
					default:
						r = "", t = ""
				}
				var o = {
					icon: r,
					title: t,
					action_title: n,
					level: a._getMaxLevel()
				};
				return o
			},
			isLogin: function() {
				return PageData.user.is_login
			},
			needUpdateTdou: function() {
				var r = a,
					t = e;
				return !(r && t)
			},
			_getMaxLevel: function(e) {
				var a = 0,
					r = (new Date).getTime(),
					t = e || window.EncourageData.userLevel || {};
				return t && 1e3 * t.end_time > r && parseInt(t.props_id, 10) > a && (a = parseInt(t.props_id, 10)), a
			},
			_getMaxLevelExpire: function(e) {
				var a = 0,
					r = (new Date).getTime(),
					t = e || window.EncourageData.userLevel;
				return t && parseInt(t.props_id, 10) > a && (a = parseInt(t.props_id, 10), 1e3 * t.end_time <= r && (a = 0 - a)), a
			},
			getTdou: function(e, a, r) {
				var t = this;
				t._get_tdou_ajax && t._get_tdou_ajax.abort(), t._get_tdou_ajax = $.ajax({
					type: "get",
					url: t.route.getTdou + "?" + new Date,
					data: {},
					cache: !1,
					dataType: "json"
				}).success(function(t) {
					e.call(a, t, r)
				})
			},
			getSimpleUserData: function() {
				return {
					mParr_props: {
						level: EncourageData.userLevel
					},
					Parr_scores: EncourageData.userScore,
					vipInfo: EncourageData.vipInfo
				}
			},
			getUserTreasure: function() {
				return window.EncourageData.userScore ? window.EncourageData.userScore.treasure_coin_total || 0 : 0
			}
		}
	})
}();
_.Module.define({
	path: "encourage-payment/widget/base_dialog_user_bar",
	requires: ["encourage-payment/widget/base_user_data", "user/widget/icons"],
	sub: {
		tpl: '<div class="base_dialog_user_bar base_user_data">      <div class="header_title">          <span class="header_icon"></span>          <span><%=title%></span>      </div>      <div class="user_info">              <span class="title_acc">\u8d26\u53f7\uff1a                  <%= userIcon %>                  <a class="title_acc_name <%=member_red%> "><%=user_name%></a>              </span>              <%if(is_tdou_info_display){%>              <span class="tdou_remain">T\u8c46\u4f59\u989d\uff1a                  <span class="tdou_remain_num">                      <span class="icon-tbean user_tdou_icon"></span>                      <span class="j_tdou"><%=tdou_num%></span>                  </span>                  </span>          <%}%>      </div>      <a class="header_close j_header_close"></a>  </div>',
		initial: function() {
			this.dataProxy = this.requireInstance("encourage-payment/widget/base_user_data"), this.member = this.dataProxy.getMemberIcon(), this.icon = this.requireInstance("user/widget/icons")
		},
		getUserBarTemplate: function(e) {
			var a = this,
				s = "",
				t = !0;
			e && "getmember" == e ? (s = a.member.action_title, t = !1) : s = "\u83b7\u53d6T\u8c46";
			var r = "",
				i = a.member.icon;
			("ordinary_member_icon" == $.trim(i) || "super_member_icon" == $.trim(i) || i.indexOf("vip1-18") > 0 || i.indexOf("vip2-18") > 0) && (r = " member_red ");
			var n = this.dataProxy.getSimpleUserData(),
				_ = this.icon.getPreIconHtml($.getPageData("mParr_props", {}, n), n, !0),
				o = {
					user_name: a.dataProxy.getUserName(),
					tdou_num: a.dataProxy.getUserTdou(),
					member: a.member.icon,
					member_red: r,
					title: s,
					is_tdou_info_display: t,
					userIcon: _
				},
				d = window._.template(a.tpl, o);
			return d
		}
	}
});
_.Module.define({
	path: "encourage-payment/widget/qianbao_cashier_dialog",
	requires: ["encourage-payment/widget/base_user_data"],
	sub: {
		iframeContainerId: "qianbao_cashier_payment_channel_wrap",
		qianbaoLbscashierUrl: "//zhifu.baidu.com/static/js/pc/iframe/lbscashier-iframe.js?t=" + (new Date).getTime(),
		services: {
			createOrder: "/tbmall/getPayUrl",
			getOrder: "/tbmall/getorder"
		},
		initial: function() {
			this.dataProxy = this.requireInstance("encourage-payment/widget/base_user_data")
		},
		createMain: function(a, e) {
			var t = this;
			window.qianbaoCashier = function() {
				return t
			}(), t.setLoading(), $.isFunction(e) && e(t.$root), t.changeoPayAmount(a), t.qianbao_params_json = t.getParams(a)
		},
		buildCashier: function(a) {
			var e = this;
			e.cashier ? e.cashier.updateOrder(a) : (e.cashier = new window.lbscashier({
				onmessage: e.onMessage,
				containerId: e.iframeContainerId,
				data: a,
				height: 360
			}), $("#cashier-iframe").css({
				border: "none"
			}))
		},
		onMessage: function(a) {
			var e = window.qianbaoCashier;
			if(!a) return console.log("onmessage null"), void 0;
			var t = a.type,
				i = a.data,
				o = a.option,
				n = o && o.channel,
				s = !1;
			if("updateOrder" === t) e.clearPayLoading();
			else if("pay" === t) switch(i) {
				case "submit":
					if("wechat" === n || "alipayqr" === n || "gameyeepay" === n || "mobileyeepay" === n) return;
					e.showPaymentTip(), e.track("pay-submit");
					break;
				case "addcard":
					break;
				case "success":
					e.track("pay-success");
					var c = "wechat" === n || "alipayqr" === n || "gameyeepay" === n || "mobileyeepay" === n ? !0 : !1;
					c ? (s = !0, e.checkQrcodePaymentResult()) : e.showPaymentTip(c)
			} else if("qrcodeAlipay" === t) switch(i) {
				case "success":
					e.showPaymentTip(), e.track("alipay-qrcode-success")
			} else if("qrcodeWechat" === t) switch(i) {
				case "success":
					e.showPaymentTip(), e.track("wechat-qrcode-success")
			}
			s || e.clearLoading()
		},
		getSmallUser: function() {
			var a = PageData.user.id,
				e = a % 2;
			return !e
		},
		showDialog: function(a, e, t) {
			var i = this,
				o = a.qianbao_params;
			i.product = a.product, $.JsLoadManager.loadUrl(i.qianbaoLbscashierUrl, function() {
				i.buildDialog(e), i.createMain(o, t)
			})
		},
		buildDialog: function(a) {
			var e = this;
			if(e._iframe_dialog) {
				if(!$(".qianbao_cashier_iframe_dialog").is(":hidden")) return;
				$(".qianbao_cashier_iframe_dialog").remove()
			}
			var t = e.getDialogTpl(a),
				i = {
					modal: !0,
					showTitle: !1,
					fixed: !0,
					width: 717,
					height: 614,
					hideOnclose: !1,
					holderClassName: "qianbao_cashier_iframe_dialog",
					draggable: !0,
					html: t
				};
			e._iframe_dialog = new $.dialog(i), e._iframe_dialog.show(), e._setBody(), e.$root = e._iframe_dialog.element, e.track("show")
		},
		_setBody: function() {
			$("body").css({
				height: $(window).height(),
				overflow: "hidden"
			}), $(".dialogJmodal").css({
				height: $(window).outerHeight(),
				width: $(window).outerWidth(),
				position: "fixed",
				top: 0,
				left: 0
			})
		},
		_hideBody: function() {
			$("body").css({
				height: "inherit",
				overflow: "auto"
			})
		},
		getDialogTpl: function(a) {
			var e = this,
				t = "member" === e.product ? '<div class="qianbao_cashier_agreement">\u8bf7\u52a1\u5fc5\u5ba1\u9605\u5e76\u63a5\u53d7<a href="https://tieba.baidu.com/tb/vip_eula.html">\u300a\u8d34\u5427\u4f1a\u5458\u670d\u52a1\u534f\u300b</a>\u6240\u6709\u6761\u6b3e\uff0c\u5426\u5219\u60a8\u65e0\u6743\u4f7f\u7528\u672c\u670d\u52a1</div>' : '<div class="qianbao_cashier_agreement">\u8bf7\u52a1\u5fc5\u5ba1\u9605\u5e76\u63a5\u53d7<a href="https://tieba.baidu.com/tb/tdouprecautions.html">\u300aT\u8c46\u8d2d\u4e70\u987b\u77e5\u300b</a>\u6240\u6709\u6761\u6b3e\uff0c\u5426\u5219\u60a8\u65e0\u6743\u4f7f\u7528\u672c\u670d\u52a1\u3002<div class="protocol"><a target="_blank" href="https://tieba.baidu.com/tb/tdou_highpay_pc.html">\u5145\u503c\u653b\u7565</a>|<a target="_blank" href="https://tieba.baidu.com/tb/tdou_highpay_show.html">\u9650\u989d\u67e5\u8be2</a></div></div>',
				i = '<div class="qianbao_cashier_dialog j_qianbao_cashier_dialog"><!-- htmlcs-disable -->  <div class="loading j_qianbao_cashier_loading">      <table height="100%" width="100%">          <tbody><tr>              <td valign="middle" align="center">                  <img src="//tb2.bdstatic.com/tb/static-common/widget/qianbao_cashier_dialog/images/charging_f0da091.gif">                  <p class="j_loading_text">\u52a0\u8f7d\u4e2d\uff0c\u8bf7\u7a0d\u5019...</p>              </td>          </tr>          </tbody>      </table>  </div><!-- htmlcs-disable -->  <div class="qiaobao_pay_loading j_pay_loading">      <table height="100%" width="100%">          <tbody>          <tr>              <td valign="middle" align="center">                  <img src="//tb2.bdstatic.com/tb/static-common/widget/qianbao_cashier_dialog/images/charging_f0da091.gif">                    <p class="j_loading_text">\u52a0\u8f7d\u4e2d\uff0c\u8bf7\u7a0d\u5019~</p>              </td>          </tr>          </tbody>      </table>  </div><div class="qianbao_cashier_payment_goods_wrap">#{goodsShowTpl}</div><div class="qianbao_cashier_payment_channel_wrap" id="' + e.iframeContainerId + '"></div>' + t + "</div>",
				o = {
					goodsShowTpl: a
				};
			return i = $.tb.format(i, o)
		},
		changeoPayAmount: function(a) {
			var e = this,
				t = a;
			e.qianbao_params_json = e.getParams(a), e.qianbaoSecure.checkAuthorication(function() {
				e.buildCashier(t)
			})
		},
		closeDialog: function() {
			var a = this,
				e = a._iframe_dialog;
			e && e.close(), this._hideBody(), delete window.qianbaoCashier, clearTimeout(a.timerId), a.track("\u5173\u95ed\u7a97\u53e3")
		},
		getParams: function(a) {
			var e = {};
			if(!a) return e;
			var t = /orderId=[^&]*/,
				i = t.exec(a);
			if(1 == i.length) {
				var o = i[0].split("=");
				e.orderId = o[1] || ""
			}
			return e
		},
		getPageUrl: function() {
			var a = $.tb.location.getHref();
			return a = a.replace(/&customerId=.*|\?customerId=.*/g, "")
		},
		checkPaymentResult: function() {
			var a = this;
			a.getPaymentResult("ok", function(e) {
				a.showPaymentSuccess(e)
			}, function(e) {
				a.showPaymentFailure(e)
			})
		},
		checkQrcodePaymentResult: function() {
			this.setLoading("check"), this.checkPaymentResult()
		},
		getPaymentResult: function(a, e, t) {
			var i = this;
			i.setLoading();
			var o = {
					order_id: i.qianbao_params_json.orderId
				},
				n = {
					product: i.product,
					userName: i.dataProxy.getUserName()
				};
			i._checkPaymentResult && i._checkPaymentResult.abort();
			var s = 5,
				c = function() {
					s--, clearTimeout(i.checkPaymentId), i._checkPaymentResult = $.ajax({
						type: "GET",
						url: i.services.getOrder,
						data: o,
						dataType: "json"
					}).success(function(o) {
						var r = o.data.db_money || 0;
						r /= 100;
						var d = o.data.scores_total;
						if(!d) {
							var l = o.data.given_scores || 0;
							d = 1e3 * r + l + i.dataProxy.getUserTdou()
						}
						n = $.extend(n, {
							payAmount: r.toFixed(2),
							totalScores: d,
							payTdou: (o.data.given_scores || 0) + (10 * o.data.db_money || 0)
						});
						var p = o.data.member_info;
						if(p) {
							var _ = "yyyy-MM-dd",
								u = 1e3 * parseInt(p.create_time),
								m = 1e3 * parseInt(p.end_time);
							n = $.extend(n, {
								create_time: $.dateFormat(new Date(u), _),
								end_time: $.dateFormat(new Date(m), _)
							})
						}
						0 == o.no ? (i.clearLoading(), clearTimeout(i.checkPaymentId), e && e(n), s = 5) : s > 0 && "ok" === a ? i.checkPaymentId = setTimeout(c, 1e3) : (i.clearLoading(), t && t(n))
					})
				};
			i.checkPaymentId = setTimeout(c, 1e3)
		},
		setLoading: function(a) {
			var e = this,
				t = e.$root.find(".j_qianbao_cashier_loading");
			if(!t.is(":visible")) {
				var i = {
					loading: "\u52a0\u8f7d\u4e2d\uff0c\u8bf7\u7a0d\u5019...",
					paying: "\u5f88\u52aa\u529b\u7684\u5145\u503c\u4e2d...",
					check: "\u67e5\u8be2\u5145\u503c\u7ed3\u679c\u4e2d..."
				};
				t.show(), t.find(".j_loading_text").html(i[a] || i.loading)
			}
		},
		clearLoading: function() {
			var a = this,
				e = a.$root.find(".j_qianbao_cashier_loading");
			1 == e.length && e.hide()
		},
		showPaymentTip: function(a) {
			var e = this,
				t = e.$root.find(".j_qianbao_payment_tip");
			1 == t.length && t.remove(), e.$root.find(".j_qianbao_cashier_dialog").append(baidu.template('<!-- htmlcs-disable -->  <section class="qianbao_payment_tip j_qianbao_payment_tip ">      <div class="tip_dialog">          <div class="tip_dialog_content">              <%if(isQuickPay){%>              <p class="description">\u60a8\u5df2\u6210\u529f\u652f\u4ed8</p>              <%} else {%>              <p class="description">\u8bf7\u5728\u65b0\u6253\u5f00\u9875\u9762\u4e0a\u5b8c\u6210\u5145\u503c</p>              <%}%>              <p class="description-tips">\u4ed8\u6b3e\u5b8c\u6210\u524d\u8bf7\u4e0d\u8981\u5173\u95ed\u6216\u5237\u65b0\u6b64\u7a97\u53e3</p>              <div class="center">                  <a class="btn_default btn_sub btn-middle j_close qianbao_pay_tip_btn j_try_pay_again" style="margin-right: 20px;">\u5931\u8d25\uff0c\u91cd\u65b0\u652f\u4ed8</a>                  <a class="btn_default btn-middle btn-encourage j_pay_ok qianbao_pay_tip_btn">\u652f\u4ed8\u6210\u529f</a>              </div>          </div>          <span class="tip_dialog_close j_close"></span>      </div>      <span class="middle-helper"></span>  </section>', {
				isQuickPay: a
			})), t = e.$root.find(".j_qianbao_payment_tip"), t.find(".j_close").on("click", function() {
				e.hidePaymentTip(), e.getPaymentResult("fail", function(a) {
					e.showPaymentSuccess(a)
				}, function() {
					e.trigger("event_tdou_qianbao_pay_again")
				})
			}), t.find(".j_pay_ok").on("click", function() {
				e.checkPaymentResult(), e.hidePaymentTip()
			})
		},
		hidePaymentTip: function() {
			var a = this,
				e = a.$root.find(".j_qianbao_payment_tip");
			e && e.remove()
		},
		showPayLoading: function() {
			var a = this,
				e = a.$root.find(".j_pay_loading");
			e.show(), e.find(".j_loading_text").html("\u52a0\u8f7d\u4e2d\uff0c\u8bf7\u7a0d\u5019...")
		},
		clearPayLoading: function() {
			var a = this,
				e = a.$root.find(".j_pay_loading");
			1 == e.length && e.hide()
		},
		showPaymentSuccess: function(a) {
			var e = this,
				t = baidu.template('<!-- htmlcs-disable -->  <div class="qiaobao_pay_result_dialog j_qiaobao_pay_result_dialog">      <div class="result_title">          <span class="result_pic success_pic"></span>          <%if(product == \'tdou\'){%>          <span class="result_txt">\u83b7\u53d6\u6210\u529f\uff01</span>          <p style="text-align:center">\u60a8\u53ef\u4ee5\u5728<span class="pay_amount">\u6211\u7684T\u8c46\u94b1\u5305</span>\u4e2d\u67e5\u770b\u8be6\u7ec6\u4fe1\u606f</p>          <%}else if(product == \'member\'){%>          <span class="result_txt">\u5145\u503c\u6210\u529f\uff01</span>          <%}%>      </div>        <%if(product == \'tdou\'){%>      <p><label>\u8d26\u53f7\uff1a</label><%=userName%></p>      <p><label>\u83b7\u8d60T\u8c46\uff1a</label><span class="pay_amount"><%=payTdou%></span>T\u8c46</p>      <p><label>\u652f\u4ed8\u91d1\u989d\uff1a</label><span class="pay_amount"><%=payAmount%></span>\u5143</p>      <%}else if(product == \'member\'){%>      <p><label>\u4f1a\u5458\u8d77\u59cb\u65e5\u671f\uff1a</label><span class="member_date"><%=create_time%></span></p>        <p><label>\u4f1a\u5458\u7ed3\u675f\u65e5\u671f\uff1a</label><span class="member_date"><%=end_time%></span></p>      <%}%>        <div class="button_container">          <a class="btn_default btn-middle btn-encourage qianbao_pay_result_btn j_close ">              <%if(product == \'tdou\'){%>              \u7ee7\u7eed\u83b7\u53d6              <%}else if(product == \'member\'){%>              \u7ee7\u7eed\u5145\u503c              <%}%>          </a>      </div>      <p style="text-align:center"><span class=" second j_second">5</span>\u79d2\u540e\u5173\u95ed\u7a97\u53e3</p>  </div>', a);
			e.updateUserInfo(a.totalScores), e.showPaymentResult(t)
		},
		showPaymentFailure: function(a) {
			var e = this,
				t = baidu.template('<!-- htmlcs-disable -->  <div class="qiaobao_pay_result_dialog j_qiaobao_pay_result_dialog">      <div class="result_title">          <span class="result_pic fialed_pic"></span>          <%if(product == \'tdou\'){%>          <span class="result_txt">\u83b7\u53d6\u5931\u8d25\uff01</span>          <%}else if(product == \'member\'){%>          <span class="result_txt">\u5145\u503c\u5931\u8d25\uff01</span>          <%}%>      </div>      <p><label>\u8d26\u53f7\uff1a</label><%=userName%></p>      <p><label>\u83b7\u8d60T\u8c46\uff1a</label><span class="pay_amount"><%=payTdou%></span>T\u8c46</p>      <p><label>\u652f\u4ed8\u91d1\u989d\uff1a</label><span class="pay_amount"><%=payAmount%></span>\u5143</p>        <div class="button_container">          <a class="btn_default btn-middle btn-encourage qianbao_pay_result_btn j_repay ">              <%if(product == \'tdou\'){%>              \u91cd\u65b0\u83b7\u53d6              <%}else if(product == \'member\'){%>              \u91cd\u65b0\u5145\u503c              <%}%>          </a>      </div>        <p style="text-align:center">          <span class="second j_second">5</span>\u79d2\u540e\u5173\u95ed\u7a97\u53e3          <a href="//tieba.baidu.com/hermes/feedback?category=pay">\u8fdb\u884c\u53cd\u9988</a>      </p>  </div>', a);
			e.showPaymentResult(t)
		},
		updateUserInfo: function(a) {
			EncourageData.userScore.scores_total = a, this.$root.find(".j_tdou").html(a)
		},
		showPaymentResult: function(a) {
			var e = this;
			e.$root.find(".j_qianbao_cashier_dialog").append($(a));
			var t = e.$root.find(".j_qiaobao_pay_result_dialog .j_second"),
				i = 5,
				o = function() {
					return i--, 0 == i ? (e.closeDialog(), void 0) : (t.html(i), e.timerId = setTimeout(o, 1e3), void 0)
				};
			e.timerId = setTimeout(o, 1e3), e.$root.on("click", ".j_qiaobao_pay_result_dialog .j_close", function() {
				e.closeDialog()
			}).on("click", ".j_qiaobao_pay_result_dialog .j_repay", function() {
				clearTimeout(e.timerId), e.$root.find(".qiaobao_pay_result_dialog").remove(), e.trigger("event_tdou_qianbao_pay_again")
			})
		},
		track: function(a, e, t) {
			var i = this;
			$.stats.track(a, e || "qianbaoCashierDialog-" + i.product, PageData.product + "-" + (t || "qianbao-cashier-" + i.product), "click")
		}
	}
});
_.Module.define({
	path: "encourage-payment/widget/qianbao_purchase_member",
	requires: ["encourage-payment/widget/qianbao_cashier_dialog", "encourage-payment/widget/base_user_data", "encourage-payment/widget/base_dialog_user_bar", "tbui/widget/login_dialog"],
	sub: {
		$root: null,
		memberOptions: null,
		id: "qianbao_purchase_member",
		initial: function() {
			var e = this;
			window.pageUnit = window.pageUnit || {};
			var t = window.pageUnit;
			t[this.id] || (t[this.id] = $.ajax({
				url: "/theme/getPage",
				type: "GET",
				data: {
					id: ["qianbao_purchase_member_hot_message", "qianbao_purchase_member_member_types"]
				},
				dataType: "json"
			}).done(function(a) {
				a = a.data || {}, t[e.id] = {
					hotMessage: a.qianbao_purchase_member_hot_message || "\u8fd8\u7b49\u4ec0\u4e48\u5347\u7ea7\u5e74\u8d39\u4f1a\u5458\uff0c\u7ecf\u9a8c\u589e\u957f\u66f4\u5feb\uff01",
					memberTypes: a.qianbao_purchase_member_member_types || "super, normal"
				}, t[e.id].memberTypes = t[e.id].memberTypes.split(/\s*,\s*/g)
			}).fail(function() {
				t[e.id] = {
					hotMessage: "\u8fd8\u7b49\u4ec0\u4e48\u5347\u7ea7\u5e74\u8d39\u4f1a\u5458\uff0c\u7ecf\u9a8c\u589e\u957f\u66f4\u5feb\uff01",
					memberTypes: ["super", "normal"]
				}
			})), e.cashierDialog = e.requireInstance("encourage-payment/widget/qianbao_cashier_dialog"), e.baseData = e.requireInstance("encourage-payment/widget/base_user_data"), e.baseDialogUserBar = this.requireInstance("encourage-payment/widget/base_dialog_user_bar"), e.vip3Src = "//tb2.bdstatic.com/tb/img/tb-plus-vip3_8f36413.png", e.vip4Src = "//tb2.bdstatic.com/tb/img/tb-plus-vip4_e08e4b7.png", e.return_url = e.cashierDialog.getPageUrl(), e.cashierDialog.bind("event_tdou_qianbao_pay_again", e.payAgain, e)
		},
		payAgain: function() {
			var e = this;
			e.showDialog(e.memberOptions)
		},
		showDialog: function(e) {
			var t = this;
			t.product = e.product || "member", t.memberOptions = e, t.member = t.baseData.getMemberIcon();
			var a = $.now(),
				i = new Date("2018-07-10 00:00:00").getTime(),
				r = new Date("2018-08-31 24:00:00").getTime();
			t.initMemberId = "1050002", t.initMemberCount = a > i && r > a ? "12" : "3", t.getPayMemberOrder(t.initMemberId, t.initMemberCount, function(e) {
				var a = {
					qianbao_params: e
				};
				t.showMember(a);
				var i = t.cashierDialog.getParams(e);
				t.orderId = i.orderId
			})
		},
		showMember: function(e) {
			var t = this,
				a = window.pageUnit;
			if(a[this.id].done) return a[this.id] = a[this.id].done(function() {
				t.showMember(e)
			}), void 0;
			e.hotMessage = e.hotMessage || a[this.id].hotMessage, e.memberTypes = e.memberTypes || a[this.id].memberTypes;
			var i = e.qianbao_params || "",
				r = $.extend(e, {
					baseDialogUserBarTpl: t.baseDialogUserBar.getUserBarTemplate("getmember"),
					vip3Src: t.vip3Src,
					vip4Src: t.vip4Src,
					type_1050001: 2 == t.member.level || -2 == t.member.level ? " hide_type_1050001" : ""
				}),
				n = window.baidu.template('<!-- htmlcs-disable -->\r\n<div class="qianbao_cashier_purchase_member base_user_data">\r\n    <%- baseDialogUserBarTpl %>\r\n    <div class="member_cashier_wrap j_member_cashier_wrap" id="member_cashier_wrap">\r\n        <div class="member_wrap">\r\n            <label class="goods_title">\u9009\u62e9\u4f1a\u5458\uff1a</label>\r\n            <ul class="member_list j_member_list">\r\n                <% if(~$.inArray(\'super\', memberTypes)) { %>\r\n                <li class="member_item recommend j_order_update  j_type_1050002">\r\n                    <label class="member-type" id="ptype-1050002" data-name="\u8d34\u5427\u8d85\u7ea7\u4f1a\u5458" data-value="1050002">\r\n                        <img src="<%- vip4Src %>">\u8d34\u5427\u8d85\u7ea7\u4f1a\u5458\r\n                    </label>\r\n                </li>\r\n                <% } %>\r\n                <% if(~$.inArray(\'normal\', memberTypes)) { %>\r\n                <li class="member_item j_order_update j_type_1050001 <%- type_1050001 %>">\r\n                    <label class="member-type" id="ptype-1050001" data-name="\u8d34\u5427\u4f1a\u5458" data-value="1050001">\r\n                        <img src="<%- vip3Src %>">\r\n                        \u8d34\u5427\u4f1a\u5458\r\n                    </label>\r\n                </li>\r\n                <% } %>\r\n                <% if(memberTypes.length > 1) { %>\r\n                <li class="member-tips <%- type_1050001 %>">\r\n                    <p>\u8bf7\u9009\u62e9\u8d2d\u4e70\u5546\u54c1</p>\r\n                </li>\r\n                <% } %>\r\n            </ul>\r\n            <div class="form-explain default" style="display: none;"></div>\r\n            <div class="form-explain priority" style="display: none;">\u5f00\u901a\u4f1a\u5458\u540e\uff0c\u60a8\u5c06\u4f18\u5148\u4eab\u53d7\u8d85\u7ea7\u4f1a\u5458\u7279\u6743\uff0c\u8d85\u7ea7\u4f1a\u5458\u8fc7\u671f\u540e\u7ee7\u7eed\u4eab\u53d7\u539f\u666e\u901a\u4f1a\u5458\u7279\u6743</div>\r\n        </div>\r\n        <div class="member_time_wrap">\r\n            <label class="goods_title time-title">\u9009\u62e9\u65f6\u957f\uff1a</label>\r\n            <ul class="time_list j_time_list">\r\n                <li class="time_item  j_order_update j_time_item" style="display: list-item;">\r\n                    <label class="time-type" for="vip_month_1" id="vip_month_1" data-value="1">\r\n                        1\u4e2a\u6708\r\n                    </label>\r\n                </li>\r\n                <li class="time_item j_order_update j_time_item" style="display: list-item;">\r\n                    <label class="time-type" for="vip_month_3" id="vip_month_3" data-value="3">\r\n                        3\u4e2a\u6708\r\n                    </label>\r\n                </li>\r\n                <li class="time_item j_order_update j_time_item" style="display: list-item;">\r\n                    <label class="time-type" for="vip_month_6" id="vip_month_6" data-value="6">\r\n                        6\u4e2a\u6708\r\n                    </label>\r\n                </li>\r\n                <li class="time_item j_order_update j_time_item j_vip_month_12" style="display: list-item;">\r\n                    <label class="time-type" for="vip_month_12" id="vip_month_12" data-value="12">\r\n                        12\u4e2a\u6708\r\n                    </label>\r\n                </li>\r\n                <li class="custum_time j_custum_time">\r\n                    <label for="month-custum" class="month_custum">\r\n                        <input type="text" class="ui-input "\r\n                               name="month-custum" id="month-custum"\r\n                               placeholder="\u5176\u4ed6">\u4e2a\u6708\r\n                    </label>\r\n                </li>\r\n                <li class="member-tips">\r\n                    <p>\u8bf7\u9009\u62e9\u65f6\u957f</p>\r\n                </li>\r\n            </ul>\r\n            <div class="form-error"></div>\r\n        </div>\r\n    </div>\r\n</div>\r\n', r),
				s = {
					qianbao_params: i,
					product: "member"
				};
			t.cashierDialog.showDialog(s, n, function(e) {
				t.$root = e, t.initUI(t.initMemberId, t.initMemberCount), t.bindEvents()
			})
		},
		initUI: function(e, t) {
			var a = this;
			a.selectedUI(e, t)
		},
		selectedUI: function(e, t) {
			var a = this;
			a.$root.find(".j_member_list li").removeClass("selected"), a.$root.find(".j_type_" + e).addClass("selected"), a.$root.find(".j_time_list li").removeClass("selected");
			var i = a.$root.find("#vip_month_" + t);
			i.length ? (i.parents("li.j_time_item").addClass("selected"), a.$root.find("#month-custum").val("")) : a.$root.find(".j_custum_time").addClass("selected")
		},
		updatePayUI: function(e, t) {
			var a = this;
			a.cashierDialog.showPayLoading(), e && t && a.getPayMemberOrder(e, t, function(e) {
				a.cashierDialog.changeoPayAmount(e)
			})
		},
		bindEvents: function() {
			var e = this,
				t = 120;
			e.$root.find(".qianbao_cashier_agreement a").on("click", function(e) {
				e.stopPropagation(), $.stats.track("\u4ed8\u6b3e\u5f39\u7a97\u5e95\u90e8", "\u5f00\u901a/\u7eed\u8d39\u4f1a\u5458\u670d\u52a1\u534f\u8bae\u70b9\u51fb", PageData.page ? PageData.page : "other", "click")
			}), e.$root.find(".j_order_update").on("click", function(t) {
				t.stopPropagation(), t.preventDefault();
				var a = $(t.target),
					i = "",
					r = "";
				if(a.hasClass("member-type")) i = a.data("value"), r = e.$root.find(".j_time_list li.selected .time-type").data("value"), r || (r = e.$root.find("#month-custum").val());
				else {
					if(!a.hasClass("time-type")) return !1;
					e.$root.find("#month-custum").val(""), r = a.data("value"), i = e.$root.find(".j_member_list li.selected .member-type").data("value")
				}
				e.selectedUI(i, r), e.updatePayUI(i, r)
			}), e.$root.find("#month-custum").on("input propertychange", function() {
				var a = /^[1-9]\d*$/,
					i = $(this),
					r = i.val();
				(r && !a.test(r) || a.test(r) && r > t) && (r = r.replace(/\D/g, "").replace(/^0(\d*)$/, "$1"), r = Math.min(t, r), 0 == r && (r = 1), i.val(r));
				var n = e.$root.find(".j_member_list li.selected .member-type").data("value");
				e.updatePayUI(n, r)
			}).on("focus", function(a) {
				var i = $(a.target);
				e.$root.find(".j_time_list li").removeClass("selected"), e.$root.find(".j_custum_time").addClass("selected"), e.cashierDialog.showPayLoading();
				var r = i.val(),
					n = /^[1-9]\d*$/;
				(r && !n.test(r) || n.test(r) && r > t) && (r = r.replace(/\D/g, "").replace(/^0(\d*)$/, "$1"), r = Math.min(t, r), 0 == r && (r = 1), i.val(r));
				var s = e.$root.find(".j_member_list li.selected .member-type").data("value");
				e.updatePayUI(s, r)
			}), e.$root.find(".j_header_close").on("click", function() {
				e.cashierDialog.closeDialog()
			}), e.$root.find(".j_vip_month_12").hover(function() {
				e.showMonth12Bubble()
			}, function() {
				e.hideMonth12Bubble()
			})
		},
		getPayMemberOrder: function(e, t, a) {
			var i = this,
				r = {
					terminal: "pc",
					pay_type: 1,
					channel: 2,
					memberId: e,
					memberCount: t,
					pageUrl: i.return_url
				};
			i._getPayMemberAjax && i._getPayMemberAjax.abort(), i._getPayMemberAjax = $.ajax({
				type: "GET",
				url: "/tbmall/getPayUrl",
				data: r,
				cache: !1,
				dataType: "json"
			}).success(function(e) {
				if(0 == e.no) a && a(e.data.return_url);
				else if(e && 1990055 === e.error_code)
					if("undefined" == typeof passport || "undefined" == typeof passport.pop.init) {
						var t = "undefined" != typeof Env && Env.server_time ? Env.server_time : (new Date).getTime(),
							r = "https://passport";
						$.JsLoadManager.use([r + ".baidu.com/passApi/js/uni_login_wrapper.js?cdnversion=" + Math.floor(t / 6e4), r + ".baidu.com/passApi/js/wrapper.js?cdnversion=" + Math.floor(t / 6e4)], function() {
							window.realname = passport.pop.init({
								type: "accRealName",
								apiOpt: {
									product: "tb",
									staticPage: "//tieba.baidu.com/tb/static-common/html/pass/v3Jump.html"
								},
								tangram: !0,
								color: "green"
							}), window.realname.show()
						}, !0, "utf-8")
					} else window.realname.show();
				else 11e4 === +e.no && i.requireInstance("tbui/widget/login_dialog")
			})
		},
		updatePayMemberOrder: function(e, t, a, i) {
			var r = this,
				n = {
					terminal: "pc",
					pay_type: 1,
					channel: 2,
					order_id: a,
					memberId: e,
					memberCount: t,
					pageUrl: r.return_url,
					fr: r.memberOptions.fr || ""
				};
			r._upPayMemberAjax && r._upPayMemberAjax.abort(), r._upPayMemberAjax = $.ajax({
				type: "GET",
				url: "/tbmall/upOrder",
				data: n,
				cache: !1,
				dataType: "json"
			}).success(function(e) {
				0 == e.no && i && i(e.data)
			})
		},
		createBubble: function(e) {
			$.extend(e, {
				arrow_dir: "down",
				arrow_pos: {
					left: 30
				},
				closeBtn: !1,
				level: 1,
				arrowReq: !0
			})
		},
		showMonth12Bubble: function() {
			var e = this;
			e.hideCustomMonthBubble();
			var t = e.$root.find(".j_vip_month_12");
			if(!e.bubble_month_12) {
				var a = {
					content: "\u4e00\u6b21\u6027\u5f00\u901a12\u4e2a\u6708\u4ee5\u4e0a\u4f1a\u5458\uff0c\u8d60\u9001\u8fde\u7eed\u7b7e\u5230\u53613\u5f20",
					bubble_css: {
						top: 0,
						right: -100,
						width: 280
					},
					wrap: t
				};
				e.bubble_month_12 = e.createBubble(a)
			}
		},
		hideMonth12Bubble: function() {
			var e = this;
			e.bubble_month_12 && e.bubble_month_12.hideBubble()
		},
		showCustomMonthBubble: function() {
			var e = this,
				t = e.$root.find(".j_custum_time");
			if(!e.bubble_custom_month) {
				var a = {
					content: "\u4e00\u6b21\u6027\u53ea\u80fd\u5f00\u901a120\u4e2a\u6708\u8d34\u5427\u4f1a\u5458",
					bubble_css: {
						top: 0,
						right: -100,
						width: 280
					},
					wrap: t
				};
				e.bubble_custom_month = e.createBubble(a)
			}
		},
		hideCustomMonthBubble: function() {
			var e = this;
			e.bubble_custom_month && e.bubble_custom_month.hideBubble()
		}
	}
});
_.Module.define({
	path: "tbui/widget/messenger/messengerProcesser",
	requires: ["tbui/widget/login_dialog"],
	sub: {
		_failCommandCacheList: {},
		initial: function() {
			this.commandMap = {
				common_login: $.proxy(this.common_login, this),
				common_register: $.proxy(this.common_register, this),
				exception_all: $.proxy(this.exception_all, this)
			}
		},
		registerCommand: function(e) {
			this.checkExistCommand(e) && (this.commandMap = $.extend(this.commandMap, e)), this.processFailCommand(e)
		},
		checkExistCommand: function(e) {
			var i;
			for(i in e)
				if(e.hasOwnProperty(i) && i in this.commandMap) return window.console && console.warn('The command "' + i + '" is already exist'), void 0;
			return !0
		},
		processFailCommand: function(e) {
			var i;
			for(i in e) {
				var t = this._failCommandCacheList[i];
				e.hasOwnProperty(i) && t && this.process(t)
			}
		},
		process: function(e) {
			if(!(e.command && e.command in this.commandMap)) return this._failCommandCacheList[e.command] = e, window.console && console.warn("Please check or register the data processing command"), void 0;
			var i = this.commandMap[e.command];
			return i(e.data)
		},
		common_login: function() {
			PageData && PageData.user && !PageData.user.is_login && this.requireInstance("tbui/widget/login_dialog")
		},
		
		exception_all: function() {
			throw new Error("Processing data exception")
		}
	}
}), _.Module.define({
	path: "tbui/widget/messenger/messengerTarget",
	requires: [],
	sub: {
		initial: function(e, i, t) {
			var n = "";
			if(arguments.length < 3 ? n = "Target error: target and name are both requied" : "object" != typeof i ? n = "Target error: target itself must be window object" : "string" != typeof t && (n = "Target error: target name must be string type"), n) throw new Error(n);
			this.prefix = e, this.target = i, this.name = t
		},
		send: function(e) {
			var i = "postMessage" in window;
			if(i) this.target.postMessage(this.prefix + e, "*");
			else {
				var t = window.navigator[this.prefix + this.name];
				if("function" != typeof t) throw new Error("Target error: target callback function is not defined");
				var n = $.tb.location,
					r = {
						origin: n.getProtocol() + "//" + n.getHost(),
						data: this.prefix + e
					};
				t(r, window)
			}
		}
	}
}), _.Module.define({
	path: "tbui/widget/messenger",
	requires: ["tbui/widget/messenger/messengerProcesser", "tbui/widget/messenger/messengerTarget"],
	sub: {
		initial: function(e, i) {
			if(!e) throw new Error("Messenger name must be asigned");
			var t = i || "[PROJECT_NAME]";
			this.name = e, this.prefix = t.toString(), this.supportPostMessage = "postMessage" in window, this.origins = [], this.processer = this.requireInstance("tbui/widget/messenger/messengerProcesser"), this.targets = {}, this._initListen()
		},
		addTarget: function(e, i) {
			this.targets[i] = this.requireInstance("tbui/widget/messenger/messengerTarget", [this.prefix, e, i])
		},
		registerCommand: function(e) {
			this.processer.registerCommand(e)
		},
		registerOrigin: function(e) {
			var i = 0;
			for("string" == typeof e && (e = [e]), i; i < e.length; i++) this.origins.push(e[i])
		},
		send: function(e) {
			var i, t = this.targets;
			for(i in t) t.hasOwnProperty(i) && t[i].send(e)
		},
		_warn: function(e) {
			window.console && window.console.warn && window.console.warn(e)
		},
		_initListen: function() {
			var e = this,
				i = function(i) {
					var t = "";
					if("object" == typeof i) {
						if(!i.data || "string" != typeof i.data) return window.console && console.warn("The received message is not type of string"), void 0;
						if(t = i.data, /^ignoredProject/.test(t)) return;
						if(t.substring(0, e.prefix.length) !== e.prefix) return window.console && console.warn("The msg type is not avaliable in project " + e.prefix), void 0;
						if(i.origin && !e._checkOrigin(i.origin)) return window.console && console.warn("The post origin is not avaliable in project " + e.prefix), void 0
					} else if(t = i, /^ignoredProject/.test(t)) return;
					t = t.slice(e.prefix.length), t = e._escapeHTML(t);
					try {
						t = $.parseJSON(t)
					} catch(n) {
						throw new Error("The JSON string is not valid")
					}
					var r = e.processer.process(t) || {};
					t.command && t.shake && t.shake_id && e.send($.json.encode({
						command: t.command + "@" + t.shake_id + "@success",
						shake: !0,
						shake_id: t.shake_id,
						data: r
					}))
				};
			window.messenger = e, this.supportPostMessage ? "addEventListener" in document ? window.addEventListener("message", i, !1) : "attachEvent" in document && window.attachEvent("onmessage", i) : window.navigator[this.prefix + this.name] = i
		},
		_escapeHTML: function(e) {
			return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/\s/g, "&nbsp;").replace(/\\"/g, "&quot;")
		},
		_checkOrigin: function(e) {
			var i = 0,
				t = this.origins.length;
			for(i; t > i; i++)
				if(this.origins[i] === e) return !0;
			return !1
		}
	}
});
_.Module.define({
	path: "encourage-payment/widget/cashier_dialog",
	requires: ["encourage-payment/widget/base_user_data", "tbui/widget/messenger"],
	sub: {
		sub_iframe_name: "cashier_dialog_iframe",
		windowId: "window_iframe_app_" + (new Date).getMilliseconds(),
		_iframe_dialog: null,
		initial: function() {
			this.dataProxy = this.requireInstance("encourage-payment/widget/base_user_data"), this.member = this.dataProxy.getMemberIcon()
		},
		getTpl: function() {
			var e = '<div class="cashier_dialog base_user_data"><div class="cashier_dialog_header"><div class="header_title"><span class="header_icon"></span>#{title}</div><div class="user_info"><span class="title_acc">\u8d26\u53f7\uff1a<span class="#{member} j_member_icon"></span><a class="title_acc_name j_member_red">#{user_name}</a></span><span class="title_remain">T\u8c46\u4f59\u989d\uff1a<span class="title_remain_num"><span class="user_tdou_icon"></span><span  class="j_tdou">#{tdou_num}<span></span></span></span></div><a class="header_close j_header_close"></a></div><div class="tdou_cashier_wrap" id="tdou_cashier_wrap"><iframe id="cashier_dialog_iframe" class="cashier_dialog_iframe" src="#{cashier_url}" frameborder="0" style="border: 0"></iframe></div></div>';
			return e
		},
		buildCashierIframe: function(e) {
			return $.tb.format(this.getTpl(), e)
		},
		showDialog: function(e) {
			var a = this;
			a._iframe_dialog && $(".tdou_member_cashier_iframe_dialog").remove(), this.options = e || {}, this.pay_fr = e.fr, this.pay_track = e.track;
			var i = e.cashier_url,
				s = this.member.action_title,
				t = {
					user_name: this.dataProxy.getUserName(),
					tdou_num: 0,
					member: this.member.icon,
					cashier_url: i,
					title: s || "\u5f00\u901a\u8d34\u5427\u8d85\u7ea7\u4f1a\u5458"
				},
				r = a.buildCashierIframe(t),
				n = {
					modal: !0,
					showTitle: !1,
					fixed: !0,
					width: 726,
					height: 564,
					hideOnclose: !1,
					holderClassName: "tdou_member_cashier_iframe_dialog",
					draggable: !0,
					html: r
				};
			a._setBody(), a._iframe_dialog = new $.dialog(n), a._iframe_dialog.show(), ("ordinary_member_icon" == $.trim(this.member.icon) || "super_member_icon" == $.trim(this.member.icon)) && a._iframe_dialog.element.find(".j_member_red").addClass("member_red"), a.updateTdou(), a.wrap = a._iframe_dialog.element, window.tdou_dianquan_iframe_dialog = a._iframe_dialog, a.track("show"), a.bindEvent(), a.initMessager()
		},
		_setBody: function() {
			$("body").css({
				height: $(window).height(),
				overflow: "hidden"
			}), $(".dialogJmodal").css({
				height: $(window).outerHeight(),
				width: $(window).outerWidth(),
				position: "fixed",
				top: 0,
				left: 0
			})
		},
		bindEvent: function() {
			var e = this;
			e.wrap.find(".j_header_close").on("click", function() {
				e.closeMain()
			})
		},
		closeMain: function() {
			var e = window.tdou_dianquan_iframe_dialog;
			e && e.close(), this._hideBody(), delete window.tdou_dianquan_iframe_dialog, this.track("\u5173\u95ed\u7a97\u53e3")
		},
		_hideBody: function() {
			$("body").css({
				height: "inherit",
				overflow: "auto"
			})
		},
		initMessager: function() {
			var e = this;
			if(!e.MessageInstance) {
				e.MessageInstance = e.requireInstance("tbui/widget/messenger", [e.windowId, "tdou_pay"]);
				var a = window.document.getElementById(e.sub_iframe_name);
				e.MessageInstance.addTarget(a.contentWindow, e.sub_iframe_name);
				var i = ["http://db.baidu.com", "http://pay.baidu.com"];
				e.MessageInstance.registerOrigin(i), e.MessageInstance.registerCommand({
					encourage_dianquan_readystatechange: $.proxy(e.onReadyStateChange, this),
					encourage_dianquan_close: $.proxy(e.onClose, this)
				})
			}
		},
		sendMessage: function(e) {
			var a = this;
			if(a.MessageInstance) {
				var i = "";
				"object" == typeof e && (i = JSON.stringify(e)), a.MessageInstance.targets[a.sub_iframe_name].send(i)
			}
		},
		onReadyStateChange: function(e) {
			if(e) switch(e.status) {
				case 2e3:
					this.updateMember(e.data), this.track("\u652f\u4ed8\u6210\u529f");
					break;
				case 3e3:
					this.onClose();
					break;
				case 3001:
					this.onClose(), this.track("\u518d\u6b21\u8d2d\u4e70")
			}
		},
		onClose: function() {
			this.closeMain()
		},
		updateTdou: function() {
			var e = this;
			e.dataProxy.getTdou(function(e) {
				if(e && 0 === e.no) {
					var a = e.data.Parr_scores,
						i = a ? a.scores_money + a.scores_other : 0;
					$(".tdou_member_cashier_iframe_dialog .j_tdou").html(i)
				}
			}, this)
		},
		updateMember: function(e) {
			var a = this,
				i = a.dataProxy.getMemberIconByLevel(e.user_level);
			$(".tdou_member_cashier_iframe_dialog .j_member_icon").addClass(i.icon);
			var s = e.user_level;
			s && (s = parseInt(s), s > 0 && $(".tdou_member_cashier_iframe_dialog .j_member_red").addClass("member_red"))
		},
		track: function(e) {
			$.stats.track(this.pay_track || "memberpay", "cashierDialog-" + this.pay_fr, PageData.product, e || "click")
		}
	}
});
_.Module.define({
	path: "encourage-payment/widget/pay_member",
	requires: ["encourage-payment/widget/base_user_data", "encourage-payment/widget/cashier_dialog", "encourage-payment/widget/qianbao_purchase_member", "encourage-payment/widget/TdouOpenType"],
	sub: {
		pay_member_url: "/tbmall/getPayUrl",
		PayMemberUrl: "/tbmall/getMyPayType",
		CASHIER: 1,
		QIANBAO: 2,
		initial: function(e) {
			var a = this;
			e = $.extend({}, e), a.requireInstance("encourage-payment/widget/base_user_data", {
				scores: e.scores,
				level: e.level
			}), a.cashierDialog = a.requireInstance("encourage-payment/widget/cashier_dialog"), a.qianbaoPayMember = a.requireInstance("encourage-payment/widget/qianbao_purchase_member"), a.openTypeList = a.requireInstance("encourage-payment/widget/TdouOpenType", {
				type: "member"
			})
		},
		showCashier: function(e) {
			var a = this,
				t = e || {};
			$.extend(t, {
				fr: t.fr || "",
				track: "memberpay"
			}), this.opt = t, a._openCtrl("dialog"), a.payType = a.QIANBAO, a.payTypeCtrl()
		},
		_openCtrl: function(e) {
			var a = this,
				t = a.openTypeList.getOpenType(a.opt.scene_id);
			switch(e = "win" === e || "dialog" === e ? e : t) {
				case "win":
					a.openNewWindow();
					break;
				case "dialog":
			}
		},
		openNewWindow: function() {
			this.win = window.open("")
		},
		openDialog: function() {
			var e = this.opt;
			this.payType == this.CASHIER ? this.cashierDialog.showDialog(e) : this.qianbaoPayMember.showDialog(e)
		},
		_getPayType: function(e) {
			var a = this,
				t = this.opt.scene_id;
			e ? (a.payType = e, a.payTypeCtrl()) : (e = 1, $.ajax({
				type: "GET",
				dataType: "json",
				url: a.PayMemberUrl,
				data: {
					terminal: "pc",
					pay_type: "member",
					id: t
				},
				success: function(t) {
					0 == t.no && (e = Number(t.data.pay_type_id) || 1), a.payType = e, a.payTypeCtrl()
				}
			}))
		},
		payTypeCtrl: function() {
			var e = this;
			e.win || e.payType != e.QIANBAO ? $.get("/tbmall/getPayUrl?terminal=pc&pay_type=1&fr=" + this.opt.fr, function(a) {
				if(a && 1990055 === a.error_code)
					if("undefined" == typeof passport || "undefined" == typeof passport.pop.init) {
						var t = "undefined" != typeof Env && Env.server_time ? Env.server_time : (new Date).getTime(),
							i = "https://passport";
						$.JsLoadManager.use([i + ".baidu.com/passApi/js/uni_login_wrapper.js?cdnversion=" + Math.floor(t / 6e4), i + ".baidu.com/passApi/js/wrapper.js?cdnversion=" + Math.floor(t / 6e4)], function() {
							window.realname = passport.pop.init({
								type: "accRealName",
								apiOpt: {
									product: "tb",
									staticPage: "//tieba.baidu.com/tb/static-common/html/pass/v3Jump.html"
								},
								tangram: !0,
								color: "green"
							}), window.realname.show()
						}, !0, "utf-8")
					} else window.realname.show();
				else a.data && (e.win ? e.win.location.href = a.data : (a.data += "&embed=1", e.opt.cashier_url = a.data, e.openDialog()))
			}) : e.openDialog()
		},
		isQianbaoHitSmallFlow: function() {
			var e = PageData && PageData.user && PageData.user.id;
			return e ? "1157380926" == e || "707573940" == e || "963463500" == e || "1093896819" == e || "1496" == e || "1134652730" == e || "982451133" == e ? !0 : (e = parseInt(e), e % 1 === 0) : !0
		}
	}
});
_.Module.define({
	path: "poster/widget/post_signature",
	sub: {
		_template: ['<option value="#{id}" #{isSelected}>#{name}</option>'].join(""),
		url: "/f/user/sign_list?t=" + +new Date,
		hasRequested: !1,
		isUsed: 0,
		data: null,
		initial: function(e) {
			this.$root = e.$container, this.gameSignature = e.gameSignature
		},
		init: function() {
			var e = this;
			this.hasRequested || (this.hasRequested = !0, null == this.data && this.requestSignature()), this.$root.on("change", ".j_use_signature", function() {
				e.isUsed = this.checked ? 1 : 0, e.toggleList(), $.post("/f/user/cm/sign_setneed", {
					need: e.isUsed,
					tbs: PosterContext.getContext().tbs
				})
			})
		},
		requestSignature: function() {
			var e = this;
			$.get(this.url, function(t) {
				t = $.json.decode(t), t && 0 == t.no && (e.data = t.data, e.isUsed = e.data.need, e.$root.find(".j_use_signature").tbattr("checked", 1 == e.isUsed), e.buildList(t.data), e.toggleList())
			})
		},
		toggleList: function() {
			var e = this.$root.find(".j_signature_wrapper");
			1 == this.isUsed ? e.show() : e.hide()
		},
		buildList: function(e) {
			var t = "",
				i = this.$root.find(".j_signature_wrapper"),
				s = i.find("select"),
				n = !1;
			if(e && e.signs.length > 0) {
				for(var a = 0, r = e.signs.length; r > a; a++) t += $.tb.format(this._template, {
					id: e.signs[a].id,
					isSelected: e.signs[a].id == e.used_id ? "selected=selected" : "",
					name: e.signs[a].name
				});
				s.html(t), n = !0
			}
			this.gameSignature && !$.isEmptyObject(this.gameSignature.signature_info) && (this.rebuildList(this.gameSignature), n = !0), n || (i.empty(), i.html('\uff08\u60a8\u76ee\u524d\u6ca1\u6709\u53ef\u4f7f\u7528\u7684\u7b7e\u540d\u6863\uff0c&nbsp;<a style="color:#0449BE" target="_blank" href="/i/sys/jump?type=signsetting">\u67e5\u770b\u5168\u90e8</a>\uff09'))
		},
		rebuildList: function(e) {
			var t = this,
				i = "",
				s = "",
				n = t.$root.find(".j_use_signature"),
				a = this.$root.find(".j_signature_wrapper select");
			1 == e.is_open && (s = "selected=selected", a.find(":selected").tbprop("selected", !1), 0 == n.tbprop("checked") && n.trigger("click")), i += $.tb.format(this._template, {
				id: 12345678,
				isSelected: s,
				name: "\u6e38\u620f\u7b7e\u540d\u6863"
			}), a.prepend(i)
		}
	}
});
_.Module.define({
	path: "poster/widget/mouse_pwd",
	sub: {
		initial: function() {
			function t(t) {
				if(!t) var t = window.event;
				var e = 0,
					n = 0;
				return t.pageX || t.pageY ? (e = t.pageX, n = t.pageY) : (t.clientX || t.clientY) && (e = t.clientX + document.body.scrollLeft, n = t.clientY + document.body.scrollTop), [e, n]
			}

			function e(t) {
				return t.offsetParent ? t.offsetLeft + e(t.offsetParent) : t.offsetLeft
			}

			function n(t) {
				return t.offsetParent ? t.offsetTop + n(t.offsetParent) : t.offsetTop
			}

			function o(o) {
				o.stopPropagation();
				var i = t(o),
					r = h[this.id];
				if(r) r.hover || (r.hover = !0, r.count++);
				else {
					var s = e(this),
						u = n(this),
						f = s + this.offsetWidth,
						a = u + this.offsetHeight;
					r = h[this.id] = {
						hover: !0,
						count: 1,
						left: s,
						top: u,
						right: f,
						buttom: a
					}
				}
				r["mouse" + r.count] || (r["mouse" + r.count] = [], r["time" + r.count] = {
					start: (new Date).getTime()
				}, h.ma.push(r["mouse" + r.count])), r["mouse" + r.count].push(i), l.push("1")
			}

			function i(e) {
				e.stopPropagation();
				var n = t(e),
					o = h[this.className];
				if(o && o.hover) {
					if(n[0] && n[0] > o.left && n[0] < o.right && n[1] && n[1] > o.top && n[1] < o.buttom) return;
					o["time" + o.count].end = (new Date).getTime(), o.hover = !1
				}
				l.push("0")
			}

			function r() {
				var t = h.ma.length;
				if(t > 0) {
					var e = h.ma[t - 1];
					return e[e.length - 1]
				}
			}

			function s() {
				var t = "",
					e = l.length;
				return e > 10 && (l = l.slice(e - 10)), t = l.join(",")
			}

			function u() {
				if(m) return c;
				var t = [r(), s(), (new Date).getTime() - this.UTSTART, [screen.width, screen.height].join(",")].join("	");
				return c.c = f(t) + "," + g + this.MOUSEPWD_CLICK, m = !0, c
			}

			function f(t) {
				for(var e = [], n = {}, o = g % 100, i = 0, r = t.length; r > i; i++) {
					var s = t.charCodeAt(i) ^ o;
					e.push(s), n[s] || (n[s] = []), n[s].push(i)
				}
				return e
			}

			function a(t) {
				this.elements = t, $.each(t, function(t, e) {
					$("." + e.toString()).bind("mouseover", o), $("." + e.toString()).bind("mouseout", i), p[e.toString()] = t
				}), $("body").bind("click", function() {
					this.MOUSEPWD_CLICK = 1
				})
			}
			this.UTSTART = (new Date).getTime(), this.MOUSEPWD_CLICK = 0;
			var h = {
					ea: [],
					ma: []
				},
				c = {},
				m = !1,
				g = (new Date).getTime(),
				p = {},
				l = [];
			this.start = a, this.report = u, this.time = g
		}
	}
});
_.Module.define({
	path: "tbui/widget/tbcopy/zero_clipboard",
	sub: {
		get: function() {
			return this.ZeroClipboard
		},
		getClient: function(e) {
			return new this.ZeroClipboard(e)
		},
		initial: function() {
			var e = this;
			! function(t, n) {
				"use strict";
				var r, a = t,
					i = a.document,
					o = a.navigator,
					l = a.setTimeout,
					s = a.Number.parseInt || a.parseInt,
					u = a.Number.parseFloat || a.parseFloat,
					c = a.Number.isNaN || a.isNaN,
					f = a.encodeURIComponent,
					p = a.Math,
					d = a.Date,
					h = a.ActiveXObject,
					y = a.Array.prototype.slice,
					v = a.Object.keys,
					g = a.Object.prototype.hasOwnProperty,
					m = function() {
						return "function" == typeof a.Object.defineProperty && function() {
							try {
								var e = {};
								return a.Object.defineProperty(e, "y", {
									value: "z"
								}), "z" === e.y
							} catch(t) {
								return !1
							}
						}() ? a.Object.defineProperty : void 0
					}(),
					b = function(e) {
						return y.call(e, 0)
					},
					w = function(e, t, n) {
						if("function" == typeof t.indexOf) return t.indexOf(e, n);
						var r, a = t.length;
						for("undefined" == typeof n ? n = 0 : 0 > n && (n = a + n), r = n; a > r; r++)
							if(g.call(t, r) && t[r] === e) return r;
						return -1
					},
					C = function() {
						var e, t, r, a, i, o, l = b(arguments),
							s = l[0] || {};
						for(e = 1, t = l.length; t > e; e++)
							if(null != (r = l[e]))
								for(a in r)
									if(g.call(r, a)) {
										if(i = s[a], o = r[a], s === o) continue;
										o !== n && (s[a] = o)
									}
						return s
					},
					x = function(e) {
						var t, n, r, a;
						if("object" != typeof e || null == e) t = e;
						else if("number" == typeof e.length)
							for(t = [], n = 0, r = e.length; r > n; n++) g.call(e, n) && (t[n] = x(e[n]));
						else {
							t = {};
							for(a in e) g.call(e, a) && (t[a] = x(e[a]))
						}
						return t
					},
					E = function(e, t) {
						for(var n = {}, r = 0, a = t.length; a > r; r++) t[r] in e && (n[t[r]] = e[t[r]]);
						return n
					},
					T = function(e, t) {
						var n = {};
						for(var r in e) - 1 === w(r, t) && (n[r] = e[r]);
						return n
					},
					j = function(e) {
						if(null == e) return [];
						if(v) return v(e);
						var t = [];
						for(var n in e) g.call(e, n) && t.push(n);
						return t
					},
					D = function(e) {
						if(e)
							for(var t in e) g.call(e, t) && delete e[t];
						return e
					},
					k = function(e, t) {
						t in e && "function" == typeof m && m(e, t, {
							value: e[t],
							writable: !1,
							configurable: !0,
							enumerable: !0
						})
					},
					I = function(e) {
						return function() {
							var t;
							return t = e.now ? e.now() : (new e).getTime()
						}
					}(d),
					O = {
						bridge: null,
						version: "0.0.0",
						pluginType: "unknown",
						disabled: null,
						outdated: null,
						unavailable: null,
						deactivated: null,
						overdue: null,
						ready: null
					},
					N = "11.0.0",
					z = {},
					L = {},
					_ = null,
					S = {
						ready: "Flash communication is established",
						error: {
							"flash-disabled": "Flash is disabled or not installed",
							"flash-outdated": "Flash is too outdated to support ZeroClipboard",
							"flash-unavailable": "Flash is unable to communicate bidirectionally with JavaScript",
							"flash-deactivated": "Flash is too outdated for your browser and/or is configured as click-to-activate",
							"flash-overdue": "Flash communication was established but NOT within the acceptable time limit"
						}
					},
					F = (function() {
						var e, t, n, r, a = "ZeroClipboard.swf";
						if(!i.currentScript || !(r = i.currentScript.src)) {
							var o = i.getElementsByTagName("script");
							if("readyState" in o[0])
								for(e = o.length; e-- && ("interactive" !== o[e].readyState || !(r = o[e].src)););
							else if("loading" === i.readyState) r = o[o.length - 1].src;
							else {
								for(e = o.length; e--;) {
									if(n = o[e].src, !n) {
										t = null;
										break
									}
									if(n = n.split("#")[0].split("?")[0], n = n.slice(0, n.lastIndexOf("/") + 1), null == t) t = n;
									else if(t !== n) {
										t = null;
										break
									}
								}
								null !== t && (r = t)
							}
						}
						return r && (r = r.split("#")[0].split("?")[0], a = r.slice(0, r.lastIndexOf("/") + 1) + a), a
					}(), {
						swfPath: "//tb2.bdstatic.com/tb/img/ZCB_8fd7d9f.swf",
						trustedDomains: t.location.host ? [t.location.host] : [],
						cacheBust: !0,
						forceEnhancedClipboard: !1,
						flashLoadTimeout: 3e4,
						autoActivate: !0,
						bubbleEvents: !0,
						containerId: "global-zeroclipboard-html-bridge",
						containerClass: "global-zeroclipboard-container",
						swfObjectId: "global-zeroclipboard-flash-bridge",
						hoverClass: "zeroclipboard-is-hover",
						activeClass: "zeroclipboard-is-active",
						forceHandCursor: !1,
						title: null,
						zIndex: 999999999
					}),
					$ = function(e) {
						if("object" == typeof e && null !== e)
							for(var t in e)
								if(g.call(e, t))
									if(/^(?:forceHandCursor|title|zIndex|bubbleEvents)$/.test(t)) F[t] = e[t];
									else if(null == O.bridge)
							if("containerId" === t || "swfObjectId" === t) {
								if(!q(e[t])) throw new Error("The specified `" + t + "` value is not valid as an HTML4 Element ID");
								F[t] = e[t]
							} else F[t] = e[t];
						return "string" == typeof e && e ? g.call(F, e) ? F[e] : void 0 : x(F)
					},
					X = function() {
						return {
							browser: E(o, ["userAgent", "platform", "appName"]),
							flash: T(O, ["bridge"]),
							zeroclipboard: {
								version: jt.version,
								config: jt.config()
							}
						}
					},
					A = function() {
						return !!(O.disabled || O.outdated || O.unavailable || O.deactivated)
					},
					Y = function(e, t) {
						var n, r, a, i = {};
						if("string" == typeof e && e) a = e.toLowerCase().split(/\s+/);
						else if("object" == typeof e && e && "undefined" == typeof t)
							for(n in e) g.call(e, n) && "string" == typeof n && n && "function" == typeof e[n] && jt.on(n, e[n]);
						if(a && a.length) {
							for(n = 0, r = a.length; r > n; n++) e = a[n].replace(/^on/, ""), i[e] = !0, z[e] || (z[e] = []), z[e].push(t);
							if(i.ready && O.ready && jt.emit({
									type: "ready"
								}), i.error) {
								var o = ["disabled", "outdated", "unavailable", "deactivated", "overdue"];
								for(n = 0, r = o.length; r > n; n++)
									if(O[o[n]] === !0) {
										jt.emit({
											type: "error",
											name: "flash-" + o[n]
										});
										break
									}
							}
						}
						return jt
					},
					B = function(e, t) {
						var n, r, a, i, o;
						if(0 === arguments.length) i = j(z);
						else if("string" == typeof e && e) i = e.split(/\s+/);
						else if("object" == typeof e && e && "undefined" == typeof t)
							for(n in e) g.call(e, n) && "string" == typeof n && n && "function" == typeof e[n] && jt.off(n, e[n]);
						if(i && i.length)
							for(n = 0, r = i.length; r > n; n++)
								if(e = i[n].toLowerCase().replace(/^on/, ""), o = z[e], o && o.length)
									if(t)
										for(a = w(t, o); - 1 !== a;) o.splice(a, 1), a = w(t, o, a);
									else o.length = 0;
						return jt
					},
					M = function(e) {
						var t;
						return t = "string" == typeof e && e ? x(z[e]) || null : x(z)
					},
					H = function(e) {
						var t, n, r;
						return e = G(e), e && !nt(e) ? "ready" === e.type && O.overdue === !0 ? jt.emit({
							type: "error",
							name: "flash-overdue"
						}) : (t = C({}, e), tt.call(this, t), "copy" === e.type && (r = st(L), n = r.data, _ = r.formatMap), n) : void 0
					},
					P = function() {
						if("boolean" != typeof O.ready && (O.ready = !1), !jt.isFlashUnusable() && null === O.bridge) {
							var e = F.flashLoadTimeout;
							"number" == typeof e && e >= 0 && l(function() {
								"boolean" != typeof O.deactivated && (O.deactivated = !0), O.deactivated === !0 && jt.emit({
									type: "error",
									name: "flash-deactivated"
								})
							}, e), O.overdue = !1, ot()
						}
					},
					Z = function() {
						jt.clearData(), jt.deactivate(), jt.emit("destroy"), lt(), jt.off()
					},
					R = function(e, t) {
						var n;
						if("object" == typeof e && e && "undefined" == typeof t) n = e, jt.clearData();
						else {
							if("string" != typeof e || !e) return;
							n = {}, n[e] = t
						}
						for(var r in n) "string" == typeof r && r && g.call(n, r) && "string" == typeof n[r] && n[r] && (L[r] = n[r])
					},
					V = function(e) {
						"undefined" == typeof e ? (D(L), _ = null) : "string" == typeof e && g.call(L, e) && delete L[e]
					},
					K = function(e) {
						if(e && 1 === e.nodeType) {
							r && (vt(r, F.activeClass), r !== e && vt(r, F.hoverClass)), r = e, yt(e, F.hoverClass);
							var t = e.getAttribute("title") || F.title;
							if("string" == typeof t && t) {
								var n = it(O.bridge);
								n && n.setAttribute("title", t)
							}
							var a = F.forceHandCursor === !0 || "pointer" === mt(e, "cursor");
							xt(a), Ct()
						}
					},
					U = function() {
						var e = it(O.bridge);
						e && (e.removeAttribute("title"), e.style.left = "0px", e.style.top = "-9999px", e.style.width = "1px", e.style.top = "1px"), r && (vt(r, F.hoverClass), vt(r, F.activeClass), r = null)
					},
					q = function(e) {
						return "string" == typeof e && e && /^[A-Za-z][A-Za-z0-9_:\-\.]*$/.test(e)
					},
					G = function(e) {
						var t;
						if("string" == typeof e && e ? (t = e, e = {}) : "object" == typeof e && e && "string" == typeof e.type && e.type && (t = e.type), t) {
							C(e, {
								type: t.toLowerCase(),
								target: e.target || r || null,
								relatedTarget: e.relatedTarget || null,
								currentTarget: O && O.bridge || null,
								timeStamp: e.timeStamp || I() || null
							});
							var n = S[e.type];
							return "error" === e.type && e.name && n && (n = n[e.name]), n && (e.message = n), "ready" === e.type && C(e, {
								target: null,
								version: O.version
							}), "error" === e.type && (/^flash-(disabled|outdated|unavailable|deactivated|overdue)$/.test(e.name) && C(e, {
								target: null,
								minimumVersion: N
							}), /^flash-(outdated|unavailable|deactivated|overdue)$/.test(e.name) && C(e, {
								version: O.version
							})), "copy" === e.type && (e.clipboardData = {
								setData: jt.setData,
								clearData: jt.clearData
							}), "aftercopy" === e.type && (e = ut(e, _)), e.target && !e.relatedTarget && (e.relatedTarget = J(e.target)), e = W(e)
						}
					},
					J = function(e) {
						var t = e && e.getAttribute && e.getAttribute("data-clipboard-target");
						return t ? i.getElementById(t) : null
					},
					W = function(e) {
						if(e && /^_(?:click|mouse(?:over|out|down|up|move))$/.test(e.type)) {
							var t = e.target,
								r = "_mouseover" === e.type && e.relatedTarget ? e.relatedTarget : n,
								o = "_mouseout" === e.type && e.relatedTarget ? e.relatedTarget : n,
								l = wt(t),
								s = a.screenLeft || a.screenX || 0,
								u = a.screenTop || a.screenY || 0,
								c = i.body.scrollLeft + i.documentElement.scrollLeft,
								f = i.body.scrollTop + i.documentElement.scrollTop,
								p = l.left + ("number" == typeof e._stageX ? e._stageX : 0),
								d = l.top + ("number" == typeof e._stageY ? e._stageY : 0),
								h = p - c,
								y = d - f,
								v = s + h,
								g = u + y,
								m = "number" == typeof e.movementX ? e.movementX : 0,
								b = "number" == typeof e.movementY ? e.movementY : 0;
							delete e._stageX, delete e._stageY, C(e, {
								srcElement: t,
								fromElement: r,
								toElement: o,
								screenX: v,
								screenY: g,
								pageX: p,
								pageY: d,
								clientX: h,
								clientY: y,
								x: h,
								y: y,
								movementX: m,
								movementY: b,
								offsetX: 0,
								offsetY: 0,
								layerX: 0,
								layerY: 0
							})
						}
						return e
					},
					Q = function(e) {
						var t = e && "string" == typeof e.type && e.type || "";
						return !/^(?:(?:before)?copy|destroy)$/.test(t)
					},
					et = function(e, t, n, r) {
						r ? l(function() {
							e.apply(t, n)
						}, 0) : e.apply(t, n)
					},
					tt = function(e) {
						if("object" == typeof e && e && e.type) {
							var t = Q(e),
								n = z["*"] || [],
								r = z[e.type] || [],
								i = n.concat(r);
							if(i && i.length) {
								var o, l, s, u, c, f = this;
								for(o = 0, l = i.length; l > o; o++) s = i[o], u = f, "string" == typeof s && "function" == typeof a[s] && (s = a[s]), "object" == typeof s && s && "function" == typeof s.handleEvent && (u = s, s = s.handleEvent), "function" == typeof s && (c = C({}, e), et(s, u, [c], t))
							}
							return this
						}
					},
					nt = function(e) {
						var t = e.target || r || null,
							n = "swf" === e._source;
						switch(delete e._source, e.type) {
							case "error":
								w(e.name, ["flash-disabled", "flash-outdated", "flash-deactivated", "flash-overdue"]) && C(O, {
									disabled: "flash-disabled" === e.name,
									outdated: "flash-outdated" === e.name,
									unavailable: "flash-unavailable" === e.name,
									deactivated: "flash-deactivated" === e.name,
									overdue: "flash-overdue" === e.name,
									ready: !1
								});
								break;
							case "ready":
								var a = O.deactivated === !0;
								C(O, {
									disabled: !1,
									outdated: !1,
									unavailable: !1,
									deactivated: !1,
									overdue: a,
									ready: !a
								});
								break;
							case "copy":
								var i, o, l = e.relatedTarget;
								!L["text/html"] && !L["text/plain"] && l && (o = l.value || l.outerHTML || l.innerHTML) && (i = l.value || l.textContent || l.innerText) ? (e.clipboardData.clearData(), e.clipboardData.setData("text/plain", i), o !== i && e.clipboardData.setData("text/html", o)) : !L["text/plain"] && e.target && (i = e.target.getAttribute("data-clipboard-text")) && (e.clipboardData.clearData(), e.clipboardData.setData("text/plain", i));
								break;
							case "aftercopy":
								jt.clearData(), t && t !== ht() && t.focus && t.focus();
								break;
							case "_mouseover":
								jt.activate(t), F.bubbleEvents === !0 && n && (rt(C({}, e, {
									type: "mouseover"
								})), rt(C({}, e, {
									type: "mouseenter",
									bubbles: !1
								})));
								break;
							case "_mouseout":
								jt.deactivate(), F.bubbleEvents === !0 && n && (rt(C({}, e, {
									type: "mouseout"
								})), rt(C({}, e, {
									type: "mouseleave",
									bubbles: !1
								})));
								break;
							case "_mousedown":
								yt(t, F.activeClass), F.bubbleEvents === !0 && n && rt(C({}, e, {
									type: e.type.slice(1)
								}));
								break;
							case "_mouseup":
								vt(t, F.activeClass), F.bubbleEvents === !0 && n && rt(C({}, e, {
									type: e.type.slice(1)
								}));
								break;
							case "_click":
							case "_mousemove":
								F.bubbleEvents === !0 && n && rt(C({}, e, {
									type: e.type.slice(1)
								}))
						}
						return /^_(?:click|mouse(?:over|out|down|up|move))$/.test(e.type) ? !0 : void 0
					},
					rt = function(e) {
						if(e && "string" == typeof e.type && e) {
							var t, n = e.target || e.srcElement || null,
								r = n && n.ownerDocument || i,
								o = {
									view: r.defaultView || a,
									canBubble: !0,
									cancelable: !0,
									detail: "click" === e.type ? 1 : 0,
									button: "number" == typeof e.which ? e.which - 1 : "number" == typeof e.button ? e.button : r.createEvent ? 0 : 1
								},
								l = C(o, e);
							n && (r.createEvent && n.dispatchEvent ? (l = [l.type, l.canBubble, l.cancelable, l.view, l.detail, l.screenX, l.screenY, l.clientX, l.clientY, l.ctrlKey, l.altKey, l.shiftKey, l.metaKey, l.button, l.relatedTarget], t = r.createEvent("MouseEvents"), t.initMouseEvent && (t.initMouseEvent.apply(t, l), n.dispatchEvent(t))) : r.createEventObject && n.fireEvent && (t = r.createEventObject(l), n.fireEvent("on" + l.type, t)))
						}
					},
					at = function() {
						var e = i.createElement("div");
						return e.id = F.containerId, e.className = F.containerClass, e.style.position = "absolute", e.style.left = "0px", e.style.top = "-9999px", e.style.width = "1px", e.style.height = "1px", e.style.zIndex = "" + Et(F.zIndex), e
					},
					it = function(e) {
						for(var t = e && e.parentNode; t && "OBJECT" === t.nodeName && t.parentNode;) t = t.parentNode;
						return t || null
					},
					ot = function() {
						var e, t = O.bridge,
							n = it(t);
						if(!t) {
							var r = dt(a.location.host, F),
								o = "never" === r ? "none" : "all",
								l = ft(F),
								s = F.swfPath + ct(F.swfPath, F);
							n = at();
							var u = i.createElement("div");
							n.appendChild(u), i.body.appendChild(n);
							var c = i.createElement("div"),
								f = "activex" === O.pluginType;
							c.innerHTML = '<object id="' + F.swfObjectId + '" name="' + F.swfObjectId + '" width="100%" height="100%" ' + (f ? 'classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"' : 'type="application/x-shockwave-flash" data="' + s + '"') + ">" + (f ? '<param name="movie" value="' + s + '"/>' : "") + '<param name="allowScriptAccess" value="' + r + '"/><param name="allowNetworking" value="' + o + '"/><param name="menu" value="false"/><param name="wmode" value="transparent"/><param name="flashvars" value="' + l + '"/></object>', t = c.firstChild, c = null, t.ZeroClipboard = jt, n.replaceChild(t, u)
						}
						return t || (t = i[F.swfObjectId], t && (e = t.length) && (t = t[e - 1]), !t && n && (t = n.firstChild)), O.bridge = t || null, t
					},
					lt = function() {
						var e = O.bridge;
						if(e) {
							var t = it(e);
							t && ("activex" === O.pluginType && "readyState" in e ? (e.style.display = "none", function n() {
								if(4 === e.readyState) {
									for(var r in e) "function" == typeof e[r] && (e[r] = null);
									e.parentNode && e.parentNode.removeChild(e), t.parentNode && t.parentNode.removeChild(t)
								} else l(n, 10)
							}()) : (e.parentNode && e.parentNode.removeChild(e), t.parentNode && t.parentNode.removeChild(t))), O.ready = null, O.bridge = null, O.deactivated = null
						}
					},
					st = function(e) {
						var t = {},
							n = {};
						if("object" == typeof e && e) {
							for(var r in e)
								if(r && g.call(e, r) && "string" == typeof e[r] && e[r]) switch(r.toLowerCase()) {
									case "text/plain":
									case "text":
									case "air:text":
									case "flash:text":
										t.text = e[r], n.text = r;
										break;
									case "text/html":
									case "html":
									case "air:html":
									case "flash:html":
										t.html = e[r], n.html = r;
										break;
									case "application/rtf":
									case "text/rtf":
									case "rtf":
									case "richtext":
									case "air:rtf":
									case "flash:rtf":
										t.rtf = e[r], n.rtf = r
								}
							return {
								data: t,
								formatMap: n
							}
						}
					},
					ut = function(e, t) {
						if("object" != typeof e || !e || "object" != typeof t || !t) return e;
						var n = {};
						for(var r in e)
							if(g.call(e, r)) {
								if("success" !== r && "data" !== r) {
									n[r] = e[r];
									continue
								}
								n[r] = {};
								var a = e[r];
								for(var i in a) i && g.call(a, i) && g.call(t, i) && (n[r][t[i]] = a[i])
							}
						return n
					},
					ct = function(e, t) {
						var n = null == t || t && t.cacheBust === !0;
						return n ? (-1 === e.indexOf("?") ? "?" : "&") + "noCache=" + I() : ""
					},
					ft = function(e) {
						var t, n, r, i, o = "",
							l = [];
						if(e.trustedDomains && ("string" == typeof e.trustedDomains ? i = [e.trustedDomains] : "object" == typeof e.trustedDomains && "length" in e.trustedDomains && (i = e.trustedDomains)), i && i.length)
							for(t = 0, n = i.length; n > t; t++)
								if(g.call(i, t) && i[t] && "string" == typeof i[t]) {
									if(r = pt(i[t]), !r) continue;
									if("*" === r) {
										l = [r];
										break
									}
									l.push.apply(l, [r, "//" + r, a.location.protocol + "//" + r])
								}
						return l.length && (o += "trustedOrigins=" + f(l.join(","))), e.forceEnhancedClipboard === !0 && (o += (o ? "&" : "") + "forceEnhancedClipboard=true"), "string" == typeof e.swfObjectId && e.swfObjectId && (o += (o ? "&" : "") + "swfObjectId=" + f(e.swfObjectId)), o
					},
					pt = function(e) {
						if(null == e || "" === e) return null;
						if(e = e.replace(/^\s+|\s+$/g, ""), "" === e) return null;
						var t = e.indexOf("//");
						e = -1 === t ? e : e.slice(t + 2);
						var n = e.indexOf("/");
						return e = -1 === n ? e : -1 === t || 0 === n ? null : e.slice(0, n), e && ".swf" === e.slice(-4).toLowerCase() ? null : e || null
					},
					dt = function() {
						var e = function(e, t) {
							var n, r, a;
							if(null != e && "*" !== t[0] && ("string" == typeof e && (e = [e]), "object" == typeof e && "number" == typeof e.length))
								for(n = 0, r = e.length; r > n; n++)
									if(g.call(e, n) && (a = pt(e[n]))) {
										if("*" === a) {
											t.length = 0, t.push("*");
											break
										} - 1 === w(a, t) && t.push(a)
									}
						};
						return function(t, n) {
							var r = pt(n.swfPath);
							null === r && (r = t);
							var a = [];
							e(n.trustedOrigins, a), e(n.trustedDomains, a);
							var i = a.length;
							if(i > 0) {
								if(1 === i && "*" === a[0]) return "always";
								if(-1 !== w(t, a)) return 1 === i && t === r ? "sameDomain" : "always"
							}
							return "never"
						}
					}(),
					ht = function() {
						try {
							return i.activeElement
						} catch(e) {
							return null
						}
					},
					yt = function(e, t) {
						if(!e || 1 !== e.nodeType) return e;
						if(e.classList) return e.classList.contains(t) || e.classList.add(t), e;
						if(t && "string" == typeof t) {
							var n = (t || "").split(/\s+/);
							if(1 === e.nodeType)
								if(e.className) {
									for(var r = " " + e.className + " ", a = e.className, i = 0, o = n.length; o > i; i++) r.indexOf(" " + n[i] + " ") < 0 && (a += " " + n[i]);
									e.className = a.replace(/^\s+|\s+$/g, "")
								} else e.className = t
						}
						return e
					},
					vt = function(e, t) {
						if(!e || 1 !== e.nodeType) return e;
						if(e.classList) return e.classList.contains(t) && e.classList.remove(t), e;
						if("string" == typeof t && t) {
							var n = t.split(/\s+/);
							if(1 === e.nodeType && e.className) {
								for(var r = (" " + e.className + " ").replace(/[\n\t]/g, " "), a = 0, i = n.length; i > a; a++) r = r.replace(" " + n[a] + " ", " ");
								e.className = r.replace(/^\s+|\s+$/g, "")
							}
						}
						return e
					},
					gt = function() {
						var e = /\-([a-z])/g,
							t = function(e, t) {
								return t.toUpperCase()
							};
						return function(n) {
							return n.replace(e, t)
						}
					}(),
					mt = function(e, t) {
						var n, r, i;
						return a.getComputedStyle ? n = a.getComputedStyle(e, null).getPropertyValue(t) : (r = gt(t), n = e.currentStyle ? e.currentStyle[r] : e.style[r]), "cursor" !== t || n && "auto" !== n || (i = e.tagName.toLowerCase(), "a" !== i) ? n : "pointer"
					},
					bt = function() {
						var e, t, n, r = 1;
						return "function" == typeof i.body.getBoundingClientRect && (e = i.body.getBoundingClientRect(), t = e.right - e.left, n = i.body.offsetWidth, r = p.round(t / n * 100) / 100), r
					},
					wt = function(e) {
						var t = {
							left: 0,
							top: 0,
							width: 0,
							height: 0
						};
						if(e.getBoundingClientRect) {
							var n, r, o, l = e.getBoundingClientRect();
							"pageXOffset" in a && "pageYOffset" in a ? (n = a.pageXOffset, r = a.pageYOffset) : (o = bt(), n = p.round(i.documentElement.scrollLeft / o), r = p.round(i.documentElement.scrollTop / o));
							var s = i.documentElement.clientLeft || 0,
								u = i.documentElement.clientTop || 0;
							t.left = l.left + n - s, t.top = l.top + r - u, t.width = "width" in l ? l.width : l.right - l.left, t.height = "height" in l ? l.height : l.bottom - l.top
						}
						return t
					},
					Ct = function() {
						var e;
						if(r && (e = it(O.bridge))) {
							var t = wt(r);
							C(e.style, {
								width: t.width + "px",
								height: t.height + "px",
								top: t.top + "px",
								left: t.left + "px",
								zIndex: "" + Et(F.zIndex)
							})
						}
					},
					xt = function(e) {
						O.ready === !0 && (O.bridge && "function" == typeof O.bridge.setHandCursor ? O.bridge.setHandCursor(e) : O.ready = !1)
					},
					Et = function(e) {
						if(/^(?:auto|inherit)$/.test(e)) return e;
						var t;
						return "number" != typeof e || c(e) ? "string" == typeof e && (t = Et(s(e, 10))) : t = e, "number" == typeof t ? t : "auto"
					},
					Tt = function(e) {
						function t(e) {
							var t = e.match(/[\d]+/g);
							return t.length = 3, t.join(".")
						}

						function n(e) {
							return !!e && (e = e.toLowerCase()) && (/^(pepflashplayer\.dll|libpepflashplayer\.so|pepperflashplayer\.plugin)$/.test(e) || "chrome.plugin" === e.slice(-13))
						}

						function r(e) {
							e && (s = !0, e.version && (p = t(e.version)), !p && e.description && (p = t(e.description)), e.filename && (f = n(e.filename)))
						}
						var a, i, l, s = !1,
							c = !1,
							f = !1,
							p = "";
						if(o.plugins && o.plugins.length) a = o.plugins["Shockwave Flash"], r(a), o.plugins["Shockwave Flash 2.0"] && (s = !0, p = "2.0.0.11");
						else if(o.mimeTypes && o.mimeTypes.length) l = o.mimeTypes["application/x-shockwave-flash"], a = l && l.enabledPlugin, r(a);
						else if("undefined" != typeof e) {
							c = !0;
							try {
								i = new e("ShockwaveFlash.ShockwaveFlash.7"), s = !0, p = t(i.GetVariable("$version"))
							} catch(d) {
								try {
									i = new e("ShockwaveFlash.ShockwaveFlash.6"), s = !0, p = "6.0.21"
								} catch(h) {
									try {
										i = new e("ShockwaveFlash.ShockwaveFlash"), s = !0, p = t(i.GetVariable("$version"))
									} catch(y) {
										c = !1
									}
								}
							}
						}
						O.disabled = s !== !0, O.outdated = p && u(p) < u(N), O.version = p || "0.0.0", O.pluginType = f ? "pepper" : c ? "activex" : s ? "netscape" : "unknown"
					};
				Tt(h);
				var jt = function() {
					return this instanceof jt ? ("function" == typeof jt._createClient && jt._createClient.apply(this, b(arguments)), void 0) : new jt
				};
				jt.version = "2.0.0", k(jt, "version"), jt.config = function() {
					return $.apply(this, b(arguments))
				}, jt.state = function() {
					return X.apply(this, b(arguments))
				}, jt.isFlashUnusable = function() {
					return A.apply(this, b(arguments))
				}, jt.on = function() {
					return Y.apply(this, b(arguments))
				}, jt.off = function() {
					return B.apply(this, b(arguments))
				}, jt.handlers = function() {
					return M.apply(this, b(arguments))
				}, jt.emit = function() {
					return H.apply(this, b(arguments))
				}, jt.create = function() {
					return P.apply(this, b(arguments))
				}, jt.destroy = function() {
					return Z.apply(this, b(arguments))
				}, jt.setData = function() {
					return R.apply(this, b(arguments))
				}, jt.clearData = function() {
					return V.apply(this, b(arguments))
				}, jt.activate = function() {
					return K.apply(this, b(arguments))
				}, jt.deactivate = function() {
					return U.apply(this, b(arguments))
				};
				var Dt = 0,
					kt = {},
					It = 0,
					Ot = {},
					Nt = {};
				C(F, {
					autoActivate: !0
				});
				var zt = function(e) {
						var t = this;
						t.id = "" + Dt++, kt[t.id] = {
							instance: t,
							elements: [],
							handlers: {}
						}, e && t.clip(e), jt.on("*", function(e) {
							return t.emit(e)
						}), jt.on("destroy", function() {
							t.destroy()
						}), jt.create()
					},
					Lt = function(e, t) {
						var n, r, a, i = {},
							o = kt[this.id] && kt[this.id].handlers;
						if("string" == typeof e && e) a = e.toLowerCase().split(/\s+/);
						else if("object" == typeof e && e && "undefined" == typeof t)
							for(n in e) g.call(e, n) && "string" == typeof n && n && "function" == typeof e[n] && this.on(n, e[n]);
						if(a && a.length) {
							for(n = 0, r = a.length; r > n; n++) e = a[n].replace(/^on/, ""), i[e] = !0, o[e] || (o[e] = []), o[e].push(t);
							if(i.ready && O.ready && this.emit({
									type: "ready",
									client: this
								}), i.error) {
								var l = ["disabled", "outdated", "unavailable", "deactivated", "overdue"];
								for(n = 0, r = l.length; r > n; n++)
									if(O[l[n]]) {
										this.emit({
											type: "error",
											name: "flash-" + l[n],
											client: this
										});
										break
									}
							}
						}
						return this
					},
					_t = function(e, t) {
						var n, r, a, i, o, l = kt[this.id] && kt[this.id].handlers;
						if(0 === arguments.length) i = j(l);
						else if("string" == typeof e && e) i = e.split(/\s+/);
						else if("object" == typeof e && e && "undefined" == typeof t)
							for(n in e) g.call(e, n) && "string" == typeof n && n && "function" == typeof e[n] && this.off(n, e[n]);
						if(i && i.length)
							for(n = 0, r = i.length; r > n; n++)
								if(e = i[n].toLowerCase().replace(/^on/, ""), o = l[e], o && o.length)
									if(t)
										for(a = w(t, o); - 1 !== a;) o.splice(a, 1), a = w(t, o, a);
									else o.length = 0;
						return this
					},
					St = function(e) {
						var t = null,
							n = kt[this.id] && kt[this.id].handlers;
						return n && (t = "string" == typeof e && e ? n[e] ? n[e].slice(0) : [] : x(n)), t
					},
					Ft = function(e) {
						if(Bt.call(this, e)) {
							"object" == typeof e && e && "string" == typeof e.type && e.type && (e = C({}, e));
							var t = C({}, G(e), {
								client: this
							});
							Mt.call(this, t)
						}
						return this
					},
					$t = function(e) {
						e = Ht(e);
						for(var t = 0; t < e.length; t++)
							if(g.call(e, t) && e[t] && 1 === e[t].nodeType) {
								e[t].zcClippingId ? -1 === w(this.id, Ot[e[t].zcClippingId]) && Ot[e[t].zcClippingId].push(this.id) : (e[t].zcClippingId = "zcClippingId_" + It++, Ot[e[t].zcClippingId] = [this.id], F.autoActivate === !0 && Rt(e[t]));
								var n = kt[this.id] && kt[this.id].elements; - 1 === w(e[t], n) && n.push(e[t])
							}
						return this
					},
					Xt = function(e) {
						var t = kt[this.id];
						if(!t) return this;
						var n, r = t.elements;
						e = "undefined" == typeof e ? r.slice(0) : Ht(e);
						for(var a = e.length; a--;)
							if(g.call(e, a) && e[a] && 1 === e[a].nodeType) {
								for(n = 0; - 1 !== (n = w(e[a], r, n));) r.splice(n, 1);
								var i = Ot[e[a].zcClippingId];
								if(i) {
									for(n = 0; - 1 !== (n = w(this.id, i, n));) i.splice(n, 1);
									0 === i.length && (F.autoActivate === !0 && Vt(e[a]), delete e[a].zcClippingId)
								}
							}
						return this
					},
					At = function() {
						var e = kt[this.id];
						return e && e.elements ? e.elements.slice(0) : []
					},
					Yt = function() {
						this.unclip(), this.off(), delete kt[this.id]
					},
					Bt = function(e) {
						if(!e || !e.type) return !1;
						if(e.client && e.client !== this) return !1;
						var t = kt[this.id] && kt[this.id].elements,
							n = !!t && t.length > 0,
							r = !e.target || n && -1 !== w(e.target, t),
							a = e.relatedTarget && n && -1 !== w(e.relatedTarget, t),
							i = e.client && e.client === this;
						return r || a || i ? !0 : !1
					},
					Mt = function(e) {
						if("object" == typeof e && e && e.type) {
							var t = Q(e),
								n = kt[this.id] && kt[this.id].handlers["*"] || [],
								r = kt[this.id] && kt[this.id].handlers[e.type] || [],
								i = n.concat(r);
							if(i && i.length) {
								var o, l, s, u, c, f = this;
								for(o = 0, l = i.length; l > o; o++) s = i[o], u = f, "string" == typeof s && "function" == typeof a[s] && (s = a[s]), "object" == typeof s && s && "function" == typeof s.handleEvent && (u = s, s = s.handleEvent), "function" == typeof s && (c = C({}, e), et(s, u, [c], t))
							}
							return this
						}
					},
					Ht = function(e) {
						return "string" == typeof e && (e = []), "number" != typeof e.length ? [e] : e
					},
					Pt = function(e, t, n) {
						return e && 1 === e.nodeType ? (e.addEventListener ? e.addEventListener(t, n, !1) : e.attachEvent && e.attachEvent("on" + t, n), e) : e
					},
					Zt = function(e, t, n) {
						return e && 1 === e.nodeType ? (e.removeEventListener ? e.removeEventListener(t, n, !1) : e.detachEvent && e.detachEvent("on" + t, n), e) : e
					},
					Rt = function(e) {
						if(e && 1 === e.nodeType) {
							var t = function(t) {
								(t || a.event) && jt.activate(e)
							};
							Pt(e, "mouseover", t), Nt[e.zcClippingId] = {
								mouseover: t
							}
						}
					},
					Vt = function(e) {
						if(e && 1 === e.nodeType) {
							var t = Nt[e.zcClippingId];
							"object" == typeof t && t && ("function" == typeof t.mouseover && Zt(e, "mouseover", t.mouseover), delete Nt[e.zcClippingId])
						}
					};
				jt._createClient = function() {
					zt.apply(this, b(arguments))
				}, jt.prototype.on = function() {
					return Lt.apply(this, b(arguments))
				}, jt.prototype.off = function() {
					return _t.apply(this, b(arguments))
				}, jt.prototype.handlers = function() {
					return St.apply(this, b(arguments))
				}, jt.prototype.emit = function() {
					return Ft.apply(this, b(arguments))
				}, jt.prototype.clip = function() {
					return $t.apply(this, b(arguments))
				}, jt.prototype.unclip = function() {
					return Xt.apply(this, b(arguments))
				}, jt.prototype.elements = function() {
					return At.apply(this, b(arguments))
				}, jt.prototype.destroy = function() {
					return Yt.apply(this, b(arguments))
				}, jt.prototype.setText = function(e) {
					return jt.setData("text/plain", e), this
				}, jt.prototype.setHtml = function(e) {
					return jt.setData("text/html", e), this
				}, jt.prototype.setRichText = function(e) {
					return jt.setData("application/rtf", e), this
				}, jt.prototype.setData = function() {
					return jt.setData.apply(this, b(arguments)), this
				}, jt.prototype.clearData = function() {
					return jt.clearData.apply(this, b(arguments)), this
				}, jt.prototype.getFlashState = function() {
					return O
				}, "function" == typeof define && define.amd ? define(function() {
					return jt
				}) : "object" == typeof module && module && "object" == typeof module.exports && module.exports ? module.exports = jt : e.ZeroClipboard = jt
			}(function() {
				return this
			}())
		}
	}
}), _.Module.define({
	path: "tbui/widget/tbcopy",
	requires: ["tbui/widget/tbcopy/zero_clipboard"],
	sub: {
		text: "",
		initial: function(e) {
			var t = $(e.ele),
				n = e.text,
				r = this.requireInstance("tbui/widget/tbcopy/zero_clipboard"),
				a = r.get();
			this.clip = new a(t), this.setText(n)
		},
		add: function(e) {
			var t = $(e);
			return t.length ? (this.clip.clip(t), this) : !1
		},
		remove: function(e) {
			var t = $(e);
			return "undefined" == typeof e || t.length ? (this.clip.unclip(e), this) : !1
		},
		elements: function() {
			return $(this.clip.elements())
		},
		setText: function(e) {
			var t = this;
			return this.clip.off("copy"), this.clip.on("copy", function(n) {
				if("function" == typeof e) t.text = e(n);
				else {
					if("string" != typeof e) return !1;
					t.text = e
				}
				n.clipboardData.setData("text/plain", t.text), t.successCallback ? t.successCallback() : $.dialog.alert("\u590d\u5236\u6210\u529f\uff01")
			}), !0
		},
		getText: function() {
			return this.text
		},
		getFlashElement: function() {
			var e = this.clip.getFlashState();
			return e.bridge
		},
		setSuccessCallback: function(e) {
			return this.successCallback = e, !0
		}
	}
});
_.Module.define({
	path: "tbui/widget/tbshare_share",
	requires: ["tbui/widget/tbcopy"],
	sub: {
		_baseConfig: {
			Parnter: {
				qqzone: {
					title: "QQ\u7a7a\u95f4",
					urlTmp: ["http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?", "url=#{url}&title=#{text}&desc=#{desc}", "&summary=#{summary}&site=#{site}&pics=#{pics}"].join("")
				},
				tsina: {
					title: "\u65b0\u6d6a\u5fae\u535a",
					urlTmp: ["http://service.weibo.com/share/share.php?", "url=#{url}&title=#{text}", "&pic=#{pics}"].join("")
				},
				renren: {
					title: "\u4eba\u4eba\u7f51",
					urlTmp: ["http://widget.renren.com/dialog/share?", "resourceUrl=#{url}&srcUrl=#{url}&title=#{text}&description=", "&pic=#{pics}"].join("")
				},
				tieba: {
					title: "\u767e\u5ea6\u8d34\u5427",
					urlTmp: ["//tieba.baidu.com/f/commit/share/openShareApi?", "url=#{url}&title=#{text}&desc=#{desc}", "&comment=#{summary}&pic=#{pics}"].join("")
				},
				weixin: {
					title: "\u5fae\u4fe1",
					urlTmp: [].join("")
				},
				copy: {
					title: "\u590d\u5236\u94fe\u63a5",
					urlTmp: [].join(""),
					attr: 'onclick="return false;"'
				},
				douban: {
					title: "\u8c46\u74e3",
					urlTmp: ["http://www.douban.com/share/service?", "href=#{url}&name=#{text}&text=#{desc}", "&image=#{pics}"].join("")
				},
				tsohu: {
					title: "\u641c\u72d0\u5fae\u535a",
					urlTmp: ["http://t.sohu.com/third/post.jsp?", "url=#{url}&title=#{text}", "&pic=#{pics}"].join("")
				}
			},
			tmp: {
				base: ['<ul class="">#{share_btns}</ul>'].join(""),
				btn: ['<div class="tbshare_#{short_name} tbshare_icon" #{attr} title="#{title}" data-share="#{short_name}">', "#{text}", '<div class="tbshare_title_box">#{title}</div>', "</div>"].join(""),
				qrcode: ['<div class="tbshare_qrcode_mask">', '<div class="tbshare_qrcode_outer">', '<div class="tbshare_qrcode_wrapper">', "<h6>\u626b\u4e00\u626b\u5206\u4eab\u5230\u5fae\u4fe1</h6>", '<div class="tbshare_qrcode_content"></div>', '<div class="tbshare_qrcode_instruction">', "<p>\u6253\u5f00\u5fae\u4fe1\uff0c\u70b9\u51fb\u5e95\u90e8\u7684\u201c\u53d1\u73b0\u201d\uff0c<br/>\u4f7f\u7528\u201c\u626b\u4e00\u626b\u201d\u5373\u53ef\u5c06\u7f51\u9875\u5206\u4eab\u81f3\u670b\u53cb\u5708\u3002</p>", "</div>", '<div class="tbshare_qrcode_close">&#215;</div>', "</div>", "</div>", '<div class="tbshare_qrcode_triangle"></div>', "</div>"].join("")
			},
			common: {
				text: document.title,
				desc: document.title,
				url: $.tb.location.getHref(),
				pics: ""
			}
		},
		qrcodeSize: 90,
		classList: {
			normal: "tbshare_wrapper",
			coco: "tbshare_wrapper_theme_coco"
		},
		typeClassList: {
			normal: "",
			vertical: "vertical"
		},
		initial: function(t) {
			if(t = $.extend({
					theme: "normal",
					type: "normal",
					initialQrcode: !0
				}, t), this.className = this.classList[t.theme], this.typeClass = this.typeClassList[t.type], !t) throw new Error("no tbShare args provided");
			if($.getPageData("forum.forum_name", null)) {
				var e = "//tieba.baidu.com/f?ie=utf-8&kw=";
				this._baseConfig.common.url = e + PageData.forum.name
			}
			this.shareContent = $.extend({}, this._baseConfig.common, t.shareContent), this.$dom = this._createShareComponent(t.targets), t.initialQrcode && (this.$qrcode = this._createQrcodeWrapper(), this.$qrcode.appendTo(this.$dom)), this._bindEvents()
		},
		getQrcode: function() {
			return this.$qrcode || (this.$qrcode = this._createQrcodeWrapper(), this.$qrcode.appendTo(this.$dom)), this.$qrcode
		},
		share: function(t) {
			if("weixin" == t) return this.getQrcode().show(), !1;
			if("copy" == t) return prompt("\u8bf7\u6309\u4e0b Ctrl+C \u590d\u5236\u94fe\u63a5\u5230\u9ecf\u8d34\u677f", this.shareContent.url || $.tb.location.getHref()), !1;
			var e = this._baseConfig.Parnter[t],
				i = this.shareContent || this._baseConfig.common;
			i = this._dataEncodeURI(i), i = $.extend({}, i), i.url += encodeURIComponent("&sharefrom=" + t);
			var r = $.tb.format(e.urlTmp, i);
			return window.open(r), !1
		},
		_createShareComponent: function(t) {
			for(var e = "", i = "", r = "", o = 0, s = t.length; s > o; o++) "[object Array]" == Object.prototype.toString.call(t[o]) ? (i = t[o][0], r = t[o][1]) : (i = t[o], r = ""), this._baseConfig.Parnter[i] && (e += ["<li>", $.tb.format(this._baseConfig.tmp.btn, {
				short_name: i,
				text: r,
				title: this._baseConfig.Parnter[i].title,
				attr: this._baseConfig.Parnter[i].attr || ""
			}), "</li>"].join(""));
			var n = $.tb.format(this._baseConfig.tmp.base, {
					share_btns: e
				}),
				a = $("<div></div>").addClass(this.className).addClass(this.typeClass).append(n);
			return a
		},
		_createQrcodeWrapper: function() {
			var t = $(this._baseConfig.tmp.qrcode),
				e = $.tb.location.getHref(),
				i = this.qrcodeSize;
			return new window.QRCode(t.find(".tbshare_qrcode_content")[0], {
				text: e || "//tieba.baidu.com",
				width: i,
				height: i
			}), t.on("click", ".tbshare_qrcode_mask", function() {
				t.hide()
			}), t.on("click", ".tbshare_qrcode_close", function() {
				t.hide()
			}), t
		},
		setQrcodeContent: function(t) {
			var e = this.getQrcode().find(".tbshare_qrcode_content"),
				i = this.qrcodeSize,
				r = e.find("img"),
				o = this;
			r.length ? (r.remove(), e.find("canvas").remove(), new window.QRCode(e[0], {
				text: t,
				width: i,
				height: i
			})) : setTimeout(function(t) {
				o.setQrcodeContent(t)
			}, 500, t)
		},
		_dataEncodeURI: function(t) {
			var e = {};
			for(var i in t) e[i] = encodeURIComponent(t[i]);
			return e
		},
		_bindEvents: function() {
			var t = this;
			this.$dom.on("click", ".tbshare_icon", function() {
				var e = $(this).data("share");
				$.getJSON("/fex/check/isRealName", function(i) {
					return i.data !== !1 || 1 !== Number(PageData.user.is_login) ? (e = e || "tieba", t.share(e)) : ($.tb.checkRealName(), void 0)
				})
			})
		},
		_lazyAddTbcopyOnce: function(t) {
			this.tbcopy = this.requireInstance("common/widget/tbcopy", {
				ele: t,
				text: $.tb.location.getHref()
			})
		},
		_AddTbcopyOnce: function() {
			var t = this.$dom.find(".tbshare_copy");
			this.tbcopy = this.requireInstance("common/widget/tbcopy", {
				ele: t,
				text: $.tb.location.getHref()
			}), this.copyElement = this.tbcopy.getFlashElement()
		},
		_getPageImgSrc: function(t) {
			var e = [];
			return $("img").each(function(i) {
				t > i && e.push($(this).tbattr("src"))
			}), e
		},
		setShareContent: function(t) {
			return "[object Object]" == Object.prototype.toString.call(t) && $.extend(this.shareContent, t), t && t.url != this.shareContent.url && this.setQrcodeContent(this.shareContent.url), this.shareContent
		},
		hideQrcode: function() {
			this.getQrcode().hide()
		}
	}
});
_.Module.define({
	path: "poster/widget/share_thread",
	requires: ["tbui/widget/tbshare_share"],
	sub: {
		_sharebase_args: {
			theme: "coco",
			targets: ["tsina", "weixin", "qqzone", "copy"]
		},
		initial: function(e) {
			this._sharebase_args = $.extend(this._sharebase_args, {
				shareContent: e && e.shareContent || {},
				targets: e && e.targets,
				type: e && e.type
			}), this.initShare(e), this._bindEvents()
		},
		initShare: function() {
			var e = this;
			e.shareInstance = e.requireInstance("tbui/widget/tbshare_share", [this._sharebase_args]), e.shareInstance.$dom.append('<a href="javascript:;" class="btn_sub btn_middle j_cancle_share btn_share_thread">\u53d6\u6d88</a>'), e.shareDialog = new $.dialog({
				holderClassName: "share_thread_dialog",
				html: e.shareInstance.$dom,
				width: 300,
				height: 130,
				title: "\u8d34\u5b50\u5206\u4eab\u5230",
				draggable: !1
			}), $.stats.track("\u5206\u4eab\u6d6e\u5c42\u5c55\u73b0", "\u65b0\u53d1\u8d34\u4f18\u5316\u7edf\u8ba1", "frs", "view"), e.shareDialog.element.delegate(".j_cancle_share", "click", function() {
				$.stats.track("\u5206\u4eab\u6d6e\u5c42\u5173\u95ed", "\u65b0\u53d1\u8d34\u4f18\u5316\u7edf\u8ba1", "frs", "click"), e.shareDialog.close()
			})
		},
		setShareContent: function(e) {
			this.shareInstance.setShareContent(e), this.shareInstance.setQrcodeContent(e.url)
		},
		_qrcodeShow: function() {
			this.shareInstance.$qrcode.show(), this.shareInstance.$dom.find(".tbshare_weixin").addClass("hover_on_qrcode")
		},
		_qrcodeHide: function() {
			this.shareInstance.$qrcode.hide(), this.shareInstance.$dom.find(".tbshare_weixin").removeClass("hover_on_qrcode")
		},
		_bindEvents: function() {
			var e = this,
				t = this.shareDialog.element;
			t.delegate(".tbshare_wrapper_theme_coco li", "mouseenter", function() {
				$(this).find(".tbshare_weixin").length ? e._qrcodeShow() : e._qrcodeHide()
			}), t.delegate(".tbshare_wrapper_theme_coco li", "mouseleave", function() {
				$(this).find(".tbshare_weixin").length && e._qrcodeHide()
			}), t.delegate(".tbshare_wrapper_theme_coco li", "mousedown", function(e) {
				try {
					var t = $(e.currentTarget.firstElementChild);
					t && $.stats.track("\u70b9\u51fb\u5206\u4eab\u8d34\u5b50\u5230-" + t.data("share"), "\u65b0\u53d1\u8d34\u4f18\u5316\u7edf\u8ba1", "frs", "click")
				} catch(e) {}
			})
		}
	}
});
_.Module.define({
	path: "poster/widget/bsk_service",
	requires: [],
	sub: {
		initial: function() {
			this.loader = window._BSK ? {
				done: function(n) {
					n()
				},
				fail: function() {}
			} : $.ajax({
				url: "https://fex.bdstatic.com/bsk/??dknsaZmLdyKfEeIVbKxn_dcc70f7.js,omzVouOACqkNljzDbdOB_af501e9.js",
				cache: !0,
				dataType: "script"
			})
		},
		slientEncrypt: function(n, e) {
			return this.encrypt(n, e)["catch"](function() {
				return e
			})
		},
		encrypt: function(n, e) {
			var t = this;
			return new Promise(function(i, o) {
				t.loader.done(function() {
					window._BSK || o(new Error("BSK load failed"));
					var t = {};
					window._BSK.a("omzVouOACqkNljzDbdOB", {
						IN: n,
						OUT: t
					}), $.extend(e, {
						_BSK: t.data
					}), i(e)
				}).fail(function() {
					o(new Error("BSK load failed"))
				})
			})
		}
	}
});
_.Module.define({
	path: "poster/widget/params_xss_handler",
	sub: {
		_escapeKeyArray: ["title", "prefix", "kw", "word"],
		initial: function(e) {
			e && e.escapeKeyArray && e.escapeKeyArray.length > 0 && (this._escapeKeyArray = e.escapeKeyArray)
		},
		xssFilter: function(e) {
			var r = $.extend({}, e),
				a = $.tb.escapeHTML,
				s = this._escapeKeyArray;
			return $.each(s, function(t) {
				var i = s[t],
					n = e[i];
				void 0 !== n && (r[i] = a(n))
			}), r
		}
	}
});